Skip to main content

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

Change seems to work for me, so pull request sent (as well as an old fashioned patch).

 

Hopefully Igor won’t say there are negative implications of doing this.

 

/James

 

From: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-bounces@xxxxxxxxxxx] On Behalf Of Nord, James
Sent: 23 March 2012 14:15
To: Maven Integration for Eclipse users mailing list
Subject: Re: [m2e-users] resource folders

 

Hi Fred,

 

Thanks for the bug link.

 

Interestingly when I removed the excluded=** and add an include **/somefile the included file doesn’t get created for me – but then it works even without any matching files in the include!  (Indigo Service Release 1, m2e 1.0.100, Windows)

 

/James

 

From: m2e-users-bounces@xxxxxxxxxxx [mailto:m2e-users-bounces@xxxxxxxxxxx] On Behalf Of Fred Bricon
Sent: 23 March 2012 13:29
To: Maven Integration for Eclipse users mailing list
Subject: 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


Back to the top