You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "olivier o (JIRA)" <ji...@codehaus.org> on 2010/03/22 12:23:24 UTC

[jira] Created: (MNG-4604) Error when changing M2_HOME on linux (at least :) )

Error when changing M2_HOME on linux (at least :) )
---------------------------------------------------

                 Key: MNG-4604
                 URL: http://jira.codehaus.org/browse/MNG-4604
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Class Loading, Command Line
    Affects Versions: 3.0-alpha-7
         Environment: Linux RH 5
            Reporter: olivier o
            Priority: Minor


When I tried to change the value of M2_HOME directory, I get the following error


-bash-3.2$ mvn -v
Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)



My m2_home includes the same settings.xml
If I unset the m2_home, it's find : 

-bash-3.2$ mvn -v
Apache Maven 3.0-alpha-7 (r921173; 2010-03-09 23:31:07+0100)
Java version: 1.6.0_07
Java home: /opt/sun/jdk1.6.0_07/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.18-164.el5" arch: "amd64" Family: "unix"



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Closed: (MNG-4604) Error when changing M2_HOME on linux (at least :) )

Posted by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MNG-4604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-4604.
----------------------------------

    Resolution: Not A Bug
      Assignee: Benjamin Bentmann

You can't mix the mvn run script and the M2_HOME var from different Maven major versions. If you point M2_HOME at a 2.x installation, the 3.x run script won't work and vice versa.

> Error when changing M2_HOME on linux (at least :) )
> ---------------------------------------------------
>
>                 Key: MNG-4604
>                 URL: http://jira.codehaus.org/browse/MNG-4604
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Class Loading, Command Line
>    Affects Versions: 3.0-alpha-7
>         Environment: Linux RH 5
>            Reporter: olivier o
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>
> When I tried to change the value of M2_HOME directory, I get the following error
> -bash-3.2$ mvn -v
> Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher
> Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> My m2_home includes the same settings.xml
> If I unset the m2_home, it's find : 
> -bash-3.2$ mvn -v
> Apache Maven 3.0-alpha-7 (r921173; 2010-03-09 23:31:07+0100)
> Java version: 1.6.0_07
> Java home: /opt/sun/jdk1.6.0_07/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.18-164.el5" arch: "amd64" Family: "unix"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MNG-4604) Error when changing M2_HOME on linux (at least :) )

Posted by "olivier o (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MNG-4604?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=214800#action_214800 ] 

olivier o commented on MNG-4604:
--------------------------------

Thanks for the quick answer. It's make sense M2_HOME related to maven2 and M3_HOME to maven 3...

> Error when changing M2_HOME on linux (at least :) )
> ---------------------------------------------------
>
>                 Key: MNG-4604
>                 URL: http://jira.codehaus.org/browse/MNG-4604
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Class Loading, Command Line
>    Affects Versions: 3.0-alpha-7
>         Environment: Linux RH 5
>            Reporter: olivier o
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>
> When I tried to change the value of M2_HOME directory, I get the following error
> -bash-3.2$ mvn -v
> Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/launcher/Launcher
> Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.launcher.Launcher
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> My m2_home includes the same settings.xml
> If I unset the m2_home, it's find : 
> -bash-3.2$ mvn -v
> Apache Maven 3.0-alpha-7 (r921173; 2010-03-09 23:31:07+0100)
> Java version: 1.6.0_07
> Java home: /opt/sun/jdk1.6.0_07/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.18-164.el5" arch: "amd64" Family: "unix"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira