You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by bandrm <ra...@gmail.com> on 2009/12/05 18:40:51 UTC

Maven Install on Mac OS X

This is my first time on a Mac. I have maven 2.2.1 installed on a Mac...but,
I have never been successfully able to execute a "mvn install" or "mvn clean
install". It would great if someone could help me out from the issues I am
having....

Firstly,I downloaded Maven 2.2.1 (tar.gz), but when I try to untar it, it
errors out in "file format unrecognized". And, every new download of Maven
2.2.1 (tar.gz) would result in different file size. So, I downloaded Maven
2.2.1 (tar.bz2) and it worked...I don't know if this could be the root cause
of all the issues I am having...

"mvn install" - When I run this command, it errors out in error: error
reading /Users/XXXXX/.m2/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar;
cannot read zip file. Basically, it unable to read jar file from repository.
I have no clue why. The file is right there in the repository, but unable to
read. but, there is one strange thing I noticed. Along with
jaxb-api-2.1.jar, there is a corresponding .pom file and both these files
have same size 357. huh?

"mvn clean install" - When I run this command, it errors out as
java.lang.NoClassDefFoundError:
org/apache/maven/shared/io/logging/MessageSink. Here is the stack trace...




java.lang.NoClassDefFoundError:
org/apache/maven/shared/io/logging/MessageSink
	at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:171)
	at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException:
org.apache.maven.shared.io.logging.MessageSink
	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:319)
	at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
	at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
	at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
	at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
	... 20 more



-- 
View this message in context: http://old.nabble.com/Maven-Install-on-Mac-OS-X-tp26657605p26657605.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: Maven Install on Mac OS X

Posted by "David C. Hicks" <dh...@i-hicks.org>.
It sounds to me like you're having a problem getting a clean download. 
Be sure to check the MD5 for your download.  If it doesn't match the one
published on the download page, then your download has errors.


bandrm wrote:
> This is my first time on a Mac. I have maven 2.2.1 installed on a Mac...but,
> I have never been successfully able to execute a "mvn install" or "mvn clean
> install". It would great if someone could help me out from the issues I am
> having....
>
> Firstly,I downloaded Maven 2.2.1 (tar.gz), but when I try to untar it, it
> errors out in "file format unrecognized". And, every new download of Maven
> 2.2.1 (tar.gz) would result in different file size. So, I downloaded Maven
> 2.2.1 (tar.bz2) and it worked...I don't know if this could be the root cause
> of all the issues I am having...
>
> "mvn install" - When I run this command, it errors out in error: error
> reading /Users/XXXXX/.m2/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar;
> cannot read zip file. Basically, it unable to read jar file from repository.
> I have no clue why. The file is right there in the repository, but unable to
> read. but, there is one strange thing I noticed. Along with
> jaxb-api-2.1.jar, there is a corresponding .pom file and both these files
> have same size 357. huh?
>
> "mvn clean install" - When I run this command, it errors out as
> java.lang.NoClassDefFoundError:
> org/apache/maven/shared/io/logging/MessageSink. Here is the stack trace...
>
>
>
>
> java.lang.NoClassDefFoundError:
> org/apache/maven/shared/io/logging/MessageSink
> 	at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:171)
> 	at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> 	at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> 	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> 	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> 	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> 	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> 	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> 	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> 	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.ClassNotFoundException:
> org.apache.maven.shared.io.logging.MessageSink
> 	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:319)
> 	at
> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
> 	at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
> 	at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
> 	at
> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
> 	... 20 more
>
>
>
>   

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


Re: Maven Install on Mac OS X

Posted by bandrm <ra...@gmail.com>.
Ok, got it. So, here is what happened... 

1) checking md5 checksum is very important. First when I installed maven, I
assumed the checksums would be correct and without md5 I installed maven.
First mistake. 
2) Initial installation created a repository /.m2, but there was no
repository directory under .m2, strange. 

So, I downloaded a fresh install of maven 2.2.1, made sure the checksums
matched. Then, I removed .m2 and created a fresh directory .m2 and then on
it worked fine. 
 
-- 
View this message in context: http://old.nabble.com/Maven-Install-on-Mac-OS-X-tp26657605p26658529.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: Maven Install on Mac OS X

Posted by bandrm <ra...@gmail.com>.
Thank you. Now, I moved onto installing Maven 2.2.1 tar.gz, rather than Maven
2.2.1 tar.bz2. But, still mvn clean install throws the following error... 

[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/usr/local/maven/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] org/apache/maven/shared/io/logging/MessageSink
org.apache.maven.shared.io.logging.MessageSink
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError:
org/apache/maven/shared/io/logging/MessageSink
	at org.apache.maven.plugin.clean.CleanMojo.execute(CleanMojo.java:171)
	at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
	at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException:
org.apache.maven.shared.io.logging.MessageSink
	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:319)
	at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
	at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
	at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
	at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
	... 20 more
[INFO]
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sat Dec 05 11:17:25 PST 2009
[INFO] Final Memory: 5M/264M
[INFO]
------------------------------------------------------------------------

-- 
View this message in context: http://old.nabble.com/Maven-Install-on-Mac-OS-X-tp26657605p26658394.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: Maven Install on Mac OS X

Posted by "David C. Hicks" <dh...@i-hicks.org>.
Run the command:

md5sum apache-maven-2.2.1-bin.tar.bz2

Check to be sure that the result matches the published checksum on the
download page:
http://maven.apache.org/download.html


bandrm wrote:
> Here are the version details...
>
> Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700)
> Java version: 1.6.0_15
> OS name: "mac os x" version: "10.6.2" arch: "x86_64" Family: "mac"
>   

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


Re: Maven Install on Mac OS X

Posted by bandrm <ra...@gmail.com>.
Here are the version details...

Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700)
Java version: 1.6.0_15
OS name: "mac os x" version: "10.6.2" arch: "x86_64" Family: "mac"
-- 
View this message in context: http://old.nabble.com/Maven-Install-on-Mac-OS-X-tp26657605p26657651.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: Maven Install on Mac OS X

Posted by Kalle Korhonen <ka...@gmail.com>.
I've seen a similar case at work where Internet access is through a
proxy. Configuring proxy incorrectly lead to "Proxy: not authorized"
messages and corresponding files stored in local repo. Needless to
say, Maven got all confused about it.

Kalle


On Sun, Dec 6, 2009 at 5:31 AM, Wayne Fay <wa...@gmail.com> wrote:
>> read. but, there is one strange thing I noticed. Along with
>> jaxb-api-2.1.jar, there is a corresponding .pom file and both these files
>> have same size 357. huh?
>
> Next time, cat the files (or edit them, whatever, just open in text
> editor) and see what they look like. The JAR file should be binary
> with a few obvious strings in it, and the pom file should be XML.
>
> I would have been interested to know what was in those 357 bytes on
> your disk -- was the jar a copy of the pom, were both corrupted due to
> being downloaded from a bad repo, or something else altogether...
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: Maven Install on Mac OS X

Posted by Wayne Fay <wa...@gmail.com>.
> read. but, there is one strange thing I noticed. Along with
> jaxb-api-2.1.jar, there is a corresponding .pom file and both these files
> have same size 357. huh?

Next time, cat the files (or edit them, whatever, just open in text
editor) and see what they look like. The JAR file should be binary
with a few obvious strings in it, and the pom file should be XML.

I would have been interested to know what was in those 357 bytes on
your disk -- was the jar a copy of the pom, were both corrupted due to
being downloaded from a bad repo, or something else altogether...

Wayne

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