Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to automatically set the JRE_CONTAINER on top of all others dependencies in Eclipse.classpath?
    primarykey
    data
    text
    <p>I want to modify <em>automatically</em> the order on which <code>classpathentry</code> are written by the Maven Eclipse plugin. Is there a way to do that?</p> <p>I want to do that for two reasons.</p> <p><strong>First reason</strong>: in my application, the interface <code>org.w3c.dom.Node</code> is provided by several third-party libraries (for XML processing), as well as the JDK (1.6). However, the version of <code>org.w3c.dom.*</code> classes provided by these libraries are quite old compared to the JDK. For example, the method <a href="http://download.oracle.com/javase/6/docs/api/org/w3c/dom/Node.html#getTextContent%28%29" rel="nofollow noreferrer"><code>Node.getTextContent()</code></a> does not exist there.</p> <p>Running <code>mvn eclipse:eclipse</code> on my project will place these library <em>before</em> the JDK container in the <code>.classpath</code>, using this method in Eclipse will result in a compilation error. So the idea is to put this line:</p> <pre><code>&lt;classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/&gt; </code></pre> <p>at the beginning of the <code>.classpath</code> file.</p> <p><strong>The second reason</strong> (less important) is when I run <code>mvn eclipse:eclipse</code>, it always set my <code>src/test/*</code> packages before <code>src/java/*</code> ones, which bothers me a little (yes, I know that in TDD we develop tests first, but still...)</p> <hr/> <p>Technical information: Java 1.6, Maven 2.2.1, Eclipse plugin 2.8</p> <hr/> <p><em>Edit:</em> There is a question <a href="https://stackoverflow.com/questions/793054/maven-classpath-order-issues">here</a> that could look similar to mine, but it did not help me as it only deals with the order for third-party dependencies...</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload