Solved.
I extracted the http://www.apache.org/dyn/closer.cgi/maven/binaries/apache-maven-2.2.1-bin.tar.gz/apache-maven-2.2.1/bin/m2.conf file:

main is org.apache.maven.cli.compat.CompatibleMain from plexus.core

set maven.home default ${user.home}/m2

[plexus.core]
load ${maven.home}/lib/*.jar

and now it works :)
Adrian.

Brett Randall wrote:
Hi Adrian,

I'm sure you've seen the unresolved bug 542162 on the Debian lists.  Can you
confirm - have you tried downloading the Maven binary bundle from
maven.apache.org, or are you still trying to run the
Ubuntu/Canonical/Debian-upstream bundle?  What does `which mvn` produce? I
recommend you try a non-bundled binary install.

Brett



On Mon, Nov 30, 2009 at 7:04 PM, Adrian Herscu <[email protected]> wrote:

Thanks for your fast reply, Brett.

Currently I have:

p...@ubuntu-desktop:~$ java -version
java version "1.6.0_16"
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Java HotSpot(TM) Client VM (build 14.2-b01, mixed mode, sharing)
p...@ubuntu-desktop:~$ javac -version
javac 1.6.0_16
p...@ubuntu-desktop:~$ mvn --version

org.codehaus.classworlds.NoSuchRealmException
       at org.codehaus.classworlds.ClassWorld.getRealm(ClassWorld.java:128)
       at org.codehaus.classworlds.Launcher.getMainRealm(Launcher.java:181)
       at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:290)
       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)
p...@ubuntu-desktop:~$

Adrian.


Brett Randall wrote:

A few folks have run into problems with the Ubuntu 9.10 upgrade. I'm
running
that kit with Maven 2.2.0 without problems.

From memory some of the problems stemmed from:

* Running the Maven bundle from Canonical - best bet is probably to run
the
plain distro if you hit problems
* The initial default behaviour of 9.10 to remove Sun JDK5, which may
leave
you without a modern JDK without knowing it. Make sure you install a
suitable JDK and set PATH and JAVA_HOME.

Please post the output of "mvn --version" if still in doubt.

Best
Brett

On Mon, Nov 30, 2009 at 6:32 AM, Adrian Herscu <[email protected]>
wrote:

 Hi all,
After upgrading from Ubuntu 9.04 to 9.10 Maven suddenly failed to launch
with the following exception:

p...@ubuntu-desktop:~/wirexn$ mvn --version
java.io.FileNotFoundException: /usr/share/maven2/bin/m2.conf (No such
file
or directory)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(FileInputStream.java:106)
      at java.io.FileInputStream.<init>(FileInputStream.java:66)
      at
org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:407)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

Looks like the m2.conf file is a symlink to ../conf/m2.conf, but there is
no such file! Created an empty m2.conf file with one line:
# m2.conf
saved, and now I am getting:

p...@ubuntu-desktop:~/wirexn$ mvn --version
org.codehaus.classworlds.NoSuchRealmException
      at
org.codehaus.classworlds.ClassWorld.getRealm(ClassWorld.java:128)
      at
org.codehaus.classworlds.Launcher.getMainRealm(Launcher.java:181)
      at
org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:290)
      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)

Also, tried to reinstall the Maven package through Synaptic.

What should I check?

TIA,
Adrian.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to