Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.4
-
None
-
None
-
WinXP, Maven 2.0.7
Description
While using a newer version of JaxWS (https://jax-ws.dev.java.net/) than the one supplied with JDK6 the generated .classpath file in my project directory contains all relevant entries headed by the entry for the JRE container.
--CODE--
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3.jar" sourcepath="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3-sources.jar"/>
<!-- MORE ENTRIES -->
<classpathentry kind="var" path="M2_REPO/dev/java/net/jaxws-api/2.1.1/jaxws-api-2.1.1.jar"/>
<!-- EVEN MORE ENTRIES -->
<classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1.jar" sourcepath="M2_REPO/commons-logging/commons-logging/1.1/commons-logging-1.1-sources.jar"/>
</classpath>
--/CODE--
As long as the JRE_CONTAINER is mentioned and loaded first my project will not compile in Eclipse since I am using operations unique to the newer version of JaxWS. When I set the order of the classpath entries in Eclipse manually (Properties - Java Build Path - Order and Export, setting the entry for JRE_CONTAINER to the 'bottom') my project will compile of course.
Nicolas de Loof suggested the following in my post to the maven users mailing list (http://www.nabble.com/Maven2-Eclipse-Plugin---ordering-of-.classpath-entries-p16722527s177.html):
--CITE--
Maybe the eclipse plugin could detect java* and javax* groupIds and force
them as toplevel ?
This would require :
- improve EclipseConfigWriter to have a new getJavaApiDeps(), and remove
those deps from getDepsOrdered - improve EclipseClasspathWriter to write getJavaApiDeps prior to the JRE
container.
--/CITE--