Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] [m2eclipse-user] Resources in target/test-classes are removed

See my answers inline.

Also, please use m2e-users@xxxxxxxxxxx mailing list


On 10-11-10 08:00 AM, Abid Hussain wrote:


Let me ask two questions:
- Is it correct that excludes=** means everything is excluded so that
the JDT cannot interfere with the Maven resource copying process?

Yes, this is correct, excludes=** tells JDT builder to ignore resources, so it does not interfere with Maven builder.

- And is it correct that in this case only m2eclipse is responsible
for resource copying and the Maven Builder is called at last in the
configured eclipse build process?

Yes, Maven builder is the only one responsible for processing (Maven) resources.



What you see is likely MNGECLIPSE-823 [1] and custom lifecycle mapping
[2] is the only solution to that problem available at the moment



PS: please use m2e-users@xxxxxxxxxxx mailing list

On 10-11-09 12:52 PM, Abid Hussain wrote:

Hi again,

I'm encountering a strange misbehaviour in m2eclipse 0.10.

As in pom.xml defined, several test resources in src/test/resources
are declared (to be copied to target/test-classes).

When eclipse performs "Building workspace", all resources from
src/test/resources are properly copied to target/test-classes.

But then, "Building workspace" is performed a second time (don't know
why) and all resources are removed again from target/test-classes.

This behaviour makes it impossible to run any JUnit test which depends
on any kind of resource.

Now it becomes interesting. The copying of test resources is
configured like this:

When I took a look in the Build Path properties of eclipse (Build Path
->    Configure Build Path) the file exclusion pattern of the source
folder src/test/resources was "**".

Those properties have been generated from m2eclipse I believe. When I
manually changed this property to "None", everything works fine: all
resources are copied to test-classes and aren't being removed.

My suspicion is the following: when checking out a project from SVN,
m2eclipse offers to check it out as maven project and generates all
eclipse specific files (.project, .classpath, etc.), right?

But what happens when the pom.xml is changed in future? Are the
eclipse project files are also being updated from m2eclipse?



Back to the top