Slightly lame suggestion, but... have you tried a different JVM, not
forgetting to set JAVA_HOME?  From your stack trace it's a JVM error, and
nothing to do with settings.xml files.

> -----Original Message-----
> From: RFatton [mailto:conorg...@hotmail.com] 
> Sent: 11 August 2009 14:00
> To: users@maven.apache.org
> Subject: FATAL ERROR: Unable to read settings.xml
> 
> 
> Hi all, 
> 
> New to maven, having trouble getting it working.
> 
> I'm using ubuntu and ran "sudo apt-get install maven2" for install.
> 
> Also added M2_HOME=/usr/share/maven2, export M2=$M2_HOME/bin, 
> export PATH=$M2:$PATH to enviroment.
> 
> When I run mvn -version I get:
> 
> Maven version: 2.0.9
> Java version: 1.5.0
> OS name: "linux" version: "2.6.24-23-xen" arch: "x86_64" 
> Family: "unix"
> 
> But when I try to do anything with mvn I get an error (full 
> error below) saying Unable to read settings.xml.
> 
> I've found the setting.xml at /etc/maven2/settings.xml 
> (/usr/share/maven2/conf is linked to this file location) so 
> tried "mvn -s /etc/maven2/settings.xml" and "mvn -s 
> /usr/share/maven2/conf/settings.xml"
> resulting in the sam error.
> 
> Tried copying settings.xml to ~/.m2, same error.
> 
> Same error when i tried very smiple settings.xml file with:
> 
> <settings xmlns="http://maven.apache.org/POM/4.0.0";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>                       http://maven.apache.org/xsd/settings-1.0.0.xsd";>
>   <proxies>
>    <proxy>
>       <active>true</active>
>       <protocol>http</protocol>
>       <host>MYPROXY</host>
>       <port>8080</port>
>     </proxy>
>   </proxies>
> 
> </settings>
> 
> and 
> 
> <settings>
>   <proxies>
>    <proxy>
>       <active>true</active>
>       <protocol>http</protocol>
>       <host>MYPROXY</host>
>       <port>8080</port>
>     </proxy>
>   </proxies>
> 
> </settings>
> 
> 
> Does this error mean that maven can't find the settings.xml 
> file? (if so how do I fix it)
> 
> How do I know which settings.xml file is being used, system or user?
> 
> Do I need to edit settings.xml from it's default at the 
> beginning? If so wouldn't one of the simple versions I hev work?
> 
> Thanks for help,
> 
> 
> 
> 
> ERROR:
> 
> When I try "mvn -e package":
> 
> + Error stacktraces are turned on.
> -----------------------------------------------------
> this realm = plexus.core
> urls[0] = file:/usr/share/maven2/lib/jsch.jar
> urls[1] = file:/usr/share/maven2/lib/wagon-provider-api.jar
> urls[2] = file:/usr/share/maven2/lib/wagon-file.jar
> urls[3] = file:/usr/share/maven2/lib/doxia-sink-api.jar
> urls[4] = file:/usr/share/maven2/lib/maven2.jar
> urls[5] = file:/usr/share/maven2/lib/plexus-interactivity-api.jar
> urls[6] = file:/usr/share/maven2/lib/wagon-ssh.jar
> urls[7] = file:/usr/share/maven2/lib/wagon-ssh-external.jar
> urls[8] = file:/usr/share/maven2/lib/xml-apis.jar
> urls[9] = file:/usr/share/maven2/lib/plexus-interpolation.jar
> urls[10] = file:/usr/share/maven2/lib/plexus-container-default.jar
> urls[11] = file:/usr/share/maven2/lib/wagon-ssh-common.jar
> urls[12] = file:/usr/share/maven2/lib/wagon-http-shared.jar
> urls[13] = file:/usr/share/maven2/lib/wagon-http-lightweight.jar
> urls[14] = file:/usr/share/maven2/lib/commons-cli.jar
> urls[15] = file:/usr/share/maven2/lib/plexus-utils.jar
> urls[16] = file:/usr/share/maven2/lib/jtidy.jar
> Number of imports: 0
> -----------------------------------------------------
> FATAL ERROR: Unable to read settings.xml Error stacktrace:
> org.codehaus.plexus.component.repository.exception.ComponentLo
> okupException:
> Unable to lookup component 
> 'org.apache.maven.settings.MavenSettingsBuilder',
> it could not be created
>    at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexu
> sContainer.java:335)
>    at org.codehaus.plexus.embed.Embedder.lookup(Embedder.java:78)
>    at org.apache.maven.cli.MavenCli.buildSettings(MavenCli.java:309)
>    at org.apache.maven.cli.MavenCli.main(MavenCli.java:191)
>    at java.lang.reflect.Method.invoke(libgcj.so.90)
>    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:
> org.codehaus.plexus.component.factory.ComponentInstantiationEx
> ception: Could not instanciate component: role:
> 'org.apache.maven.settings.MavenSettingsBuilder', implementation:
> 'org.apache.maven.settings.DefaultMavenSettingsBuilder'
>    at
> org.codehaus.plexus.component.factory.java.JavaComponentFactor
> y.makeException(JavaComponentFactory.java:77)
>    at
> org.codehaus.plexus.component.factory.java.JavaComponentFactor
> y.newInstance(JavaComponentFactory.java:62)
>    at
> org.codehaus.plexus.DefaultPlexusContainer.createComponentInst
> ance(DefaultPlexusContainer.java:1464)
>    at
> org.codehaus.plexus.component.manager.AbstractComponentManager
> .createComponentInstance(AbstractComponentManager.java:93)
>    at
> org.codehaus.plexus.component.manager.ClassicSingletonComponen
> tManager.getComponent(ClassicSingletonComponentManager.java:92)
>    at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexu
> sContainer.java:331)
>    ...8 more
> Caused by: java.lang.NoClassDefFoundError:
> org.apache.maven.settings.DefaultMavenSettingsBuilder
>    at java.lang.Class.initializeClass(libgcj.so.90)
>    at java.lang.Class.newInstance(libgcj.so.90)
>    at
> org.codehaus.plexus.component.factory.java.JavaComponentFactor
> y.newInstance(JavaComponentFactory.java:44)
>    ...12 more
> Caused by: java.lang.VerifyError: verification failed at PC 63 in
> org.apache.maven.settings.DefaultMavenSettingsBuilder:readSett
> ings((Ljava.io.File;)Lorg.apache.maven.settings.Settings;):
> incompatible type on stack
>    at java.lang.Class.initializeClass(libgcj.so.90)
>    ...14 more
> 
> 
> 
> --
> View this message in context: 
> http://www.nabble.com/FATAL-ERROR%3A-Unable-to-read-settings.x
ml-tp24917137p24917137.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
> 


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

Reply via email to