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

FYI, this issue has already been reported under https://bugs.eclipse.org/bugs/show_bug.cgi?id=356568Â

On Fri, Mar 23, 2012 at 2:23 PM, Fred Bricon <fbricon@xxxxxxxxx> wrote:
That's interesting.ÂHeret's what I get when I remove exclude=** and add include **/__m2e__ to the src/test/resources classpath entry, compared to the classic settings for src/main/resources :Â

Inline image 1


The include__m2e__ file in my example is properly created under target/test-classes/foo/bar/,Âso I don't see why you'd need to actually create the dummy files.Â
I can't think of any disadvantages of this solution over the exclude=all approach. But Igor's the specialist in this area, not me.

Regards,

Fred Bricon


On Fri, Mar 23, 2012 at 1:56 PM, Nord, James <JNord@xxxxxxx> wrote:

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
**************************************************************************************

_______________________________________________
m2e-users mailing list
m2e-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-users




--
"Have you tried turning it off and on again" - The IT Crowd



--
"Have you tried turning it off and on again" - The IT Crowd