So I tried again from a clean eclipse ganymede installation with the last dev build m2eclipse plugin.

And even if I set an external installation (in eclipse preferences : Maven|Installation|Add...) I still get the error. I get the error when I import the project (or when I "Update Project Configuration") into the eclipse workspace the erros happens when the goal [eclipse:m2eclipse] is executing during the importation process or during the "Update Project Configuration" process. I tried to manually run the goal [eclipse:m2eclipse] on the project using the external Maven runtime and it worked. Then I tried to run the same goal using with the embedded Maven runtime, and this time I get the same exception (linkage error) but with a stacktrace:

Exception in thread "main" java.lang.LinkageError: loader constraints violated when linking org/codehaus/plexus/util/xml/XMLWriter class at org.apache.maven.plugin.eclipse.writers.wtp.EclipseWtpApplicationXMLWriter.writePrettyXmlFile(EclipseWtpApplicationXMLWriter.java:624)

So the import Maven proces or the Update Project Configuration process seems to not use the external Maven runtime



I created the Jira issue : http://jira.codehaus.org/browse/MNGECLIPSE-745


Igor Fedorenko a écrit :
When using external maven runtime, m2eclipse is only supposed to use classes from that maven installation. Can you please confirm that you changes your launch configuration to use external maven 2.0.x runtime? If this does not help, please open JIRA with sample project and steps to reproduce the problem and I will have a look.

Also, you may want to add your vote to MNGECLIPSE-688, this will help us properly prioritize direct support for EAR projects in m2e/wtp integration.


Yann wrote:
No, I think the issue is in m2eclipse not in maven because I don't have any problem when I run in commande line.
And moreover I get the error from the m2eclipse console in eclipse.

I think the error could be that m2eclipse use more recent classes (for instances maven embedder 2.1...) that are not compatible with some classes of the eclipse plugin. The fact to use wtpapplicationxml to true means the eclipse:m2eclipse goal uses the XMLWriter class (in order to generate the application.xml file) and this could explains why I get the error "loader constraints violated when linking org/codehaus/plexus/util/xml/XMLWriter class"...

what do you think ?


Igor Fedorenko a écrit :
This mailing list is really about m2eclipse project (http://m2eclipse.codehaus.org/). Your problem appears to be with maven-eclipse-plugin and I believe maven user-list is the place to ask for help/advice with this maven plugin.

Yann wrote:
I tried either with the embedded maven runtime or the external maven runtime and in both cases I get the same exception.


After doing some tests I found which maven option trigger this error:
<plugin>
    <artifactId>maven-eclipse-plugin</artifactId>
    <configuration>
        <wtpapplicationxml>true</wtpapplicationxml>
        <wtpversion>1.5</wtpversion>
    </configuration>
</plugin>

If I set wtpapplicationxml to false then I don't have any error...

Should I raise a Jira issue ?

Yann.

Igor Fedorenko a écrit :
You can try using external 2.0.x maven runtime, see [1] for more details how to configure m2eclipse to use external maven runtimes

[1] http://docs.codehaus.org/display/M2ECLIPSE/Maven+Settings


Yann wrote:
Hi,

I tried to use m2eclipse on an EAR project.
When importing an EAR project as a maven project I get the following exception:

15.07.08 19:40:07 CEST: [INFO] [eclipse:m2eclipse]
15.07.08 19:40:07 CEST: [INFO] Adding support for WTP version 1.5.
15.07.08 19:40:07 CEST: [INFO] Using source status cache: C:\soft\dev\eclipse\ganymede\target\mvn-eclipse-cache.properties
15.07.08 19:40:08 CEST: [INFO] Using as WTP server : null
15.07.08 19:40:08 CEST: [FATAL ERROR] org.apache.maven.plugin.eclipse.M2EclipseMojo#execute() caused a linkage error (java.lang.LinkageError). Check the realms:

NOTE:
Plugin realm is: /plugins/org.apache.maven.plugins:maven-eclipse-plugin:[EMAIL PROTECTED]/thread:Worker-39
Container realm is: plexus.core

Realm ID: /plugins/org.apache.maven.plugins:maven-eclipse-plugin:[EMAIL PROTECTED]/thread:Worker-39 urls[0] = file:/c:/soft/javalib/maven2/local-repository/org/apache/maven/plugins/maven-eclipse-plugin/2.5.1/maven-eclipse-plugin-2.5.1.jar urls[1] = file:/c:/soft/javalib/maven2/local-repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-7/plexus-archiver-1.0-alpha-7.jar urls[2] = file:/c:/soft/javalib/maven2/local-repository/org/codehaus/plexus/plexus-utils/1.4.5/plexus-utils-1.4.5.jar urls[3] = file:/c:/soft/javalib/maven2/local-repository/junit/junit/3.8.1/junit-3.8.1.jar urls[4] = file:/c:/soft/javalib/maven2/local-repository/org/apache/maven/maven-plugin-registry/2.0.8/maven-plugin-registry-2.0.8.jar urls[5] = file:/c:/soft/javalib/maven2/local-repository/org/codehaus/plexus/plexus-interactivity-jline/1.0-alpha-5/plexus-interactivity-jline-1.0-alpha-5.jar urls[6] = file:/c:/soft/javalib/maven2/local-repository/jline/jline/0.9.1/jline-0.9.1.jar urls[7] = file:/c:/soft/javalib/maven2/local-repository/org/apache/maven/maven-archiver/2.2/maven-archiver-2.2.jar urls[8] = file:/c:/soft/javalib/maven2/local-repository/org/codehaus/plexus/plexus-resources/1.0-alpha-4/plexus-resources-1.0-alpha-4.jar urls[9] = file:/c:/soft/javalib/maven2/local-repository/biz/aQute/bndlib/0.0.145/bndlib-0.0.145.jar urls[10] = file:/c:/soft/javalib/maven2/local-repository/org/apache/maven/shared/maven-osgi/0.2.0/maven-osgi-0.2.0.jar urls[11] = file:/c:/soft/javalib/maven2/local-repository/org/eclipse/core/resources/3.3.0-v20070604/resources-3.3.0-v20070604.jar

Realm ID: plexus.core
loader constraints violated when linking org/codehaus/plexus/util/xml/XMLWriter class


The side effect of this exception is once the error happens all others projects importing in the same time fail.

Do you have an idea on how to avoid this exception ?

Thanks
Yann.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email






---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to