Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] !RE: M2Eclipse not handling generated sources properly

Ah - I see.  The fog is lifting a bit.

I obviously hadn't grasped how these two co-operate and share duties.


Thanks and regards!



From: m2e-users-bounces@xxxxxxxxxxx <m2e-users-bounces@xxxxxxxxxxx> On Behalf Of Simon Niederberger
Sent: Sunday, December 15, 2019 6:23 AM
To: michael.moser@xxxxxxxxxxx; Maven Integration for Eclipse users mailing list <m2e-users@xxxxxxxxxxx>
Subject: Re: [m2e-users] !RE: M2Eclipse not handling generated sources properly


My understanding is that with m2e

* Eclipse handles compiling Java files 

* Resource handling is delegated to maven


which is what you see in your .classpath. Eclipse takes ownership of **/*.java, but leaves resources/** to Maven. In your project -> Maven -> Lifecycle mappings you should find the counterpart, ie. Maven handling resources.




On Sat, 14 Dec 2019, 22:48 Michael Moser <michael.moser@xxxxxxxxxx> wrote:

I am confused about some eclipse .classpath files that are generated from a couple of pom files that I inherited for a medium sized project (about 10 projects, most inheriting from a "...-common" project).



When I look at the m2e-generated .classpath file, it reads:



<?xml version="1.0" encoding="UTF-8"?>


       <classpathentry including="**/*.java" kind="src" output="target/classes" path="src/main/java">


                    <attribute name="optional" value="true"/>

                    <attribute name="maven.pomderived" value="true"/>



       <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">


                    <attribute name="maven.pomderived" value="true"/>






The including="**/*.java" I understand and consider correct - we only want .java files compiled to .class files to end up in target/classes (and ignore all other files that we might encounter underneath src/main/java).

But the entry for resources puzzles me: excluding="**" would suggest to me, that NO FILES AT ALL should be copied over to target/classes. However, when I check I see that there are a couple of .xml, .xsd and .sql files copied over from the src/main/resources subtree to target/classes  (as they should be in my case because they are requires at runtime).

But what does this "excluding" then mean? Apparently it has no effect, since there are still files copied over. Puzzling!



m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top