Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-users] resource folders

Hi all,

 

To set some background resources for our test classes in maven are in a folder that matches the name of the unit test.

 

e.g  for a class com.myco.myprod.sytem.foo.bar.WhizzTest  the resources would be in src/test/resources/com/myco/myprod/system/foo/bar/WhizzTest/

 

So far so good.

 

But using m2e when the resources folder is added due to the inclusion/exclusion filter you don’t get the nice “package” list under the resources – instead you get a tree structure.

Due to the tree structure (if you use a mouse) you need to drill down many layers to see what resources are in that folder – or to get to a specific resource.

 

I am well aware of the reason to have the filter (as without it you will end up with un maven-filtered resources in the output folder) – but I have a cunning plan and was wondering if there was any drawbacks – and if it could be implemented in a pseudo lifecycle binding or if this is something that could only be done in the core (if so if it was made optional would it be something that would be accepted into m2e)?

 

The cunning plan is to change the includes and excludes

from:

                Included: (All)

                Excluded: **

to:

                Included: **/.dummyFile

                Excluded: (None)

 

and then for each directory in the resources folder create the .dummyFile.

 

optionally this file can then be manually excluded from source control.

 

Regards,

 

                /James




**************************************************************************************
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@xxxxxxx and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

Back to the top