You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rui <ru...@ef.pt> on 2012/07/24 10:42:23 UTC

ClassNotFoundException: org.codehaus.classworlds.Launcher

Hi. I'm trying to use maven to make a version of some software I'm 
working on.

Everything works fine (I can do 'mvn clean', 'mvn release:clean', and 
'mvn install' without problems) until I try to do 'mvn 
-Dmaven.test.skip=true release:prepare), at which point I get the 
following error midway through the process:

     [INFO] Not generating release POMs
     [INFO] Executing goals 'clean verify install assembly:assembly'...
     [WARNING] Maven will be executed in interactive mode, but no input 
stream has been configured for     this MavenInvoker instance.
     [INFO] Exception in thread "main" java.lang.NoClassDefFoundError: 
org/codehaus/classworlds /Launcher
     [INFO] Caused by: java.lang.ClassNotFoundException: 
org.codehaus.classworlds.Launcher
     [INFO]     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
     [INFO]     at java.security.AccessController.doPrivileged(Native 
Method)
     [INFO]     at 
java.net.URLClassLoader.findClass(URLClassLoader.java:190)
     [INFO]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [INFO]     at 
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
     [INFO]     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
     [INFO] Could not find the main class: 
org.codehaus.classworlds.Launcher.  Program will exit.
     [INFO] 
------------------------------------------------------------------------
     [ERROR] BUILD ERROR
     [INFO] 
------------------------------------------------------------------------
     [INFO] Maven execution failed, exit code: '1'

Help solving this issue would be greatly appreciated.


Regards,
Rui


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


Re: ClassNotFoundException: org.codehaus.classworlds.Launcher

Posted by Rui <ru...@ef.pt>.
Hi Brett, thanks for the reply.

My M2_HOME is /usr/shared/maven2 and the path to the executable is 
/usr/shared/maven2/bin/ so I think there is no problem there.

I did notice I have a 'mvn' in /opt/ pointing to an empty folder. It 
isn't on my path though.

On Tue 24 Jul 2012 12:07:28 PM WEST, Brett Porter wrote:
>
>
> On 24/07/2012, at 6:42 PM, Rui wrote:
>
>> Hi. I'm trying to use maven to make a version of some software I'm working on.
>>
>> Everything works fine (I can do 'mvn clean', 'mvn release:clean', and 'mvn install' without problems) until I try to do 'mvn -Dmaven.test.skip=true release:prepare), at which point I get the following error midway through the process:
>>
>>     [INFO] Not generating release POMs
>>     [INFO] Executing goals 'clean verify install assembly:assembly'...
>>     [WARNING] Maven will be executed in interactive mode, but no input stream has been configured for     this MavenInvoker instance.
>>     [INFO] Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds /Launcher
>>     [INFO] Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
>>     [INFO]     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>     [INFO]     at java.security.AccessController.doPrivileged(Native Method)
>>     [INFO]     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>     [INFO]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>     [INFO]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>     [INFO]     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>>     [INFO] Could not find the main class: org.codehaus.classworlds.Launcher.  Program will exit.
>>     [INFO] ------------------------------------------------------------------------
>>     [ERROR] BUILD ERROR
>>     [INFO] ------------------------------------------------------------------------
>>     [INFO] Maven execution failed, exit code: '1'
>>
>> Help solving this issue would be greatly appreciated.
>
>
> This usually happens when M2_HOME does not match the path of the mvn executable. You should check they both match up (including whatever version is forked in this instance).
>
> Cheers,
> Brett
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--
--
Rui Filipe Pereira de Azevedo
EF - Tecnologias de Software, S.A.
Av. António Serpa, 26 - 4º Dto.
1050-027 Lisboa
Tel: 217827800 Fax: 217827830
email: rui.azevedo@ef.pt

AVISO LEGAL: A informação presente nesta mensagem, bem como em qualquer 
dos seus anexos é confidencial e destinada exclusivamente ao(s) 
destinatário(s) nomeado(s). Qualquer utilização desta informação que 
não esteja de acordo com o seu objectivo, qualquer disseminação ou 
divulgação, total ou parcial, é proibida excepto se formalmente 
aprovada. A Internet não garante a integridade desta mensagem, a qual 
poderá ter sido interceptada, corrompida, perdida, atrasada ou 
acrescida de vírus. Assim, a EF Tecnologias de Software S.A. não se 
responsabiliza pela mensagem se modificada.

DISCLAIMER: The information in this e-mail and in any attachments is 
confidential and intended exclusively for the named addressee(s). Any 
use of this information not in accordance with its purpose, any 
dissemination or disclosure, either whole or partial, is prohibited 
except if formally approved. The internet can not guarantee the 
integrity of this message, as it could be intercepted, corrupted, lost, 
destroyed, arrive late or incomplete or have viruses added to it. EF 
Tecnologias de Software, S.A. will not therefore be liable for the 
message if modified.


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


Re: ClassNotFoundException: org.codehaus.classworlds.Launcher

Posted by Brett Porter <br...@apache.org>.

On 24/07/2012, at 6:42 PM, Rui wrote:

> Hi. I'm trying to use maven to make a version of some software I'm working on.
> 
> Everything works fine (I can do 'mvn clean', 'mvn release:clean', and 'mvn install' without problems) until I try to do 'mvn -Dmaven.test.skip=true release:prepare), at which point I get the following error midway through the process:
> 
>    [INFO] Not generating release POMs
>    [INFO] Executing goals 'clean verify install assembly:assembly'...
>    [WARNING] Maven will be executed in interactive mode, but no input stream has been configured for     this MavenInvoker instance.
>    [INFO] Exception in thread "main" java.lang.NoClassDefFoundError: org/codehaus/classworlds /Launcher
>    [INFO] Caused by: java.lang.ClassNotFoundException: org.codehaus.classworlds.Launcher
>    [INFO]     at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>    [INFO]     at java.security.AccessController.doPrivileged(Native Method)
>    [INFO]     at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>    [INFO]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>    [INFO]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>    [INFO]     at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
>    [INFO] Could not find the main class: org.codehaus.classworlds.Launcher.  Program will exit.
>    [INFO] ------------------------------------------------------------------------
>    [ERROR] BUILD ERROR
>    [INFO] ------------------------------------------------------------------------
>    [INFO] Maven execution failed, exit code: '1'
> 
> Help solving this issue would be greatly appreciated.


This usually happens when M2_HOME does not match the path of the mvn executable. You should check they both match up (including whatever version is forked in this instance).

Cheers,
Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






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