Reputation: 354
I'm doing some eclipse plugin development, I have generated my customized classpath such as <classpathentry kind="src" output="target/classes" path="src/main/webapp"/>
, but when I right click -> maven -> maven update project, it(the M2E) will override my classpath as
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/webapp">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
Actually, it will cause many problems for my business. Is there any way to configure or code inject to avoid the changes? Any help is appreciated.
Upvotes: 2
Views: 869
Reputation: 12252
The purpose of the pom (project object model) is to have one central place to include all the information about the build / class path. When updating the maven project, the information of the pom.xml file will update/override the .classpath file.
=> Do not manually alter the .classpath file but include the information in the pom.xml file.
For eclipse plugins you might want to remove the maven nature of the project since Eclipse plugins have their own way to define dependencies, see MANIFEST.MF
Upvotes: 1