I want to modify automatically the order on which classpathentry
are written by the Maven Eclipse plugin. Is there a way to do that?
I want to do that for two reasons.
First reason: in my application, the interface org.w3c.dom.Node
is provided by several third-party libraries (for XML processing), as well as the JDK (1.6). However, the version of org.w3c.dom.*
classes provided by these libraries are quite old compared to the JDK. For example, the method Node.getTextContent()
does not exist there.
Running mvn eclipse:eclipse
on my project will place these library before the JDK container in the .classpath
, using this method in Eclipse will result in a compilation error. So the idea is to put this line:
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
at the beginning of the .classpath
file.
The second reason (less important) is when I run mvn eclipse:eclipse
, it always set my src/test/*
packages before src/java/*
ones, which bothers me a little (yes, I know that in TDD we develop tests first, but still...)
Technical information: Java 1.6, Maven 2.2.1, Eclipse plugin 2.8
Edit: There is a question here that could look similar to mine, but it did not help me as it only deals with the order for third-party dependencies...