You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Patrick Zeising <p....@neusta.de> on 2008/04/16 16:54:32 UTC

Maven2 Eclipse Plugin - ordering of .classpath entries

Hi everybody,

I am using Maven2 with the Maven2 Eclipse plugin and in my project I would
like to use a newer version of JaxWS (https://jax-ws.dev.java.net/) than the
one supplied with JDK6. When using the eclipse goal ($> mvn eclipse:eclipse)
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. When I set the order of the classpath entries in
Eclipse (Properties - Java Build Path - Order and Export, setting the entry
for JRE_CONTAINER to the 'bottom') my project will compile.

Is there a way to control the order in which these classpath entries (and
the one for the JRE_CONTAINER in particular) are written to the .classpath
file? Is there a better way to do what I'm trying to do? ;)

Thx
Patrick
-- 
View this message in context: http://www.nabble.com/Maven2-Eclipse-Plugin---ordering-of-.classpath-entries-tp16722527s177p16722527.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven2 Eclipse Plugin - ordering of .classpath entries

Posted by Patrick Zeising <p....@neusta.de>.

nicolas de loof-3 wrote:
> 
> Could you create a Jira issue for this ?
> 

You can find the issue here: http://jira.codehaus.org/browse/MECLIPSE-437

Greets
Patrick
-- 
View this message in context: http://www.nabble.com/Maven2-Eclipse-Plugin---ordering-of-.classpath-entries-tp16722527s177p16761752.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven2 Eclipse Plugin - ordering of .classpath entries

Posted by nicolas de loof <ni...@apache.org>.
I get a similar issue, but using "StandardVMType/J2SE-1.5" as JRE container
on a JDK 6.0

This creates (unmodifiable) allowed/forbidden acces rules on eclipse
classpath. As the JRE is first in library ordering, I cannot include jax-ws
API that is allways resolved as "forbidden".

Having any hook to force the javax.ws* libs first solves this...

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.

Could you create a Jira issue for this ?

Nico.



2008/4/16, Patrick Zeising <p....@neusta.de>:
>
>
> Hi everybody,
>
> I am using Maven2 with the Maven2 Eclipse plugin and in my project I would
> like to use a newer version of JaxWS (https://jax-ws.dev.java.net/) than
> the
> one supplied with JDK6. When using the eclipse goal ($> mvn
> eclipse:eclipse)
> 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. When I set the order of the classpath entries in
> Eclipse (Properties - Java Build Path - Order and Export, setting the
> entry
> for JRE_CONTAINER to the 'bottom') my project will compile.
>
> Is there a way to control the order in which these classpath entries (and
> the one for the JRE_CONTAINER in particular) are written to the .classpath
> file? Is there a better way to do what I'm trying to do? ;)
>
> Thx
> Patrick
>
> --
> View this message in context:
> http://www.nabble.com/Maven2-Eclipse-Plugin---ordering-of-.classpath-entries-tp16722527s177p16722527.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>