Gentoo Archives: gentoo-java

From: Kasun Gajasinghe <kasunbg@×××××.com>
To: gentoo-java@l.g.o
Cc: kiorky <kiorky@××××××××××.net>, Serkan Kaba <serkan@g.o>, Alistair Bush <ali_bush@g.o>
Subject: [gentoo-java] [mvn-intg] maven-from-source : An issue when invoking mvn
Date: Wed, 29 Jun 2011 09:00:11
Message-Id: BANLkTi=LmmV2jymc5G-ToCgV5ebiu4PciQ@mail.gmail.com
1 Hi,
2 After bumping more than 50 ebuilds, we were finally able to bump maven
3 package itself. But there's few issues to get over with.
4
5 Following error occurs when mvn-2.2 is invoked. As you probably
6 already know, maven uses classworlds-1.1 for class loading. Further,
7 upstream uses uberjar, which packages all the dependencies together.
8 We have circumvented the need for having an uberjar by creating
9 symlinks of needed jars under the directory /usr/share/maven-2.2/lib/.
10
11 As I see, it fails before getting in to maven through classworlds.
12 Unfortunately, I haven't have much experience with of classworlds
13 behaves. Does anyone of you have any idea to get rid of this error?
14 This _may_ not be an issue of maven having an incorrect classpath.
15
16 If this is through, we'll be much closer to getting maven from source working.
17
18 $ mvn-2.2 -X
19 + Error stacktraces are turned on.
20 Apache Maven 2.2.1 (r1135082; 2011-06-26 09:41:29+0530)
21 Java version: 1.6.0_25
22 Java home: /opt/sun-jdk-1.6.0.25/jre
23 Default locale: en_US, platform encoding: ANSI_X3.4-1968
24 OS name: "linux" version: "2.6.36-gentoo-r8" arch: "i386" Family: "unix"
25 org.codehaus.classworlds.NoSuchRealmException: plexus.core
26 at org.codehaus.classworlds.ClassWorld.getRealm(ClassWorld.java:128)
27 at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:434)
28 at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
29
30
31 Maven is called via classworlds with the command:
32        "${JAVACMD}" \
33        $MAVEN_OPTS \
34        -classpath $(java-config -p classworlds-1.1) \
35        -Dclassworlds.conf=/usr/share/maven-2/maven_home/bin/m2.conf \ #the m2.
36        -Dmaven.home=/usr/share/maven-2.2 \
37        -Dmaven.repo.remote=${HOME}/.m2/repository \
38        -Dmaven.repo.local=${HOME}/.m2/repository  \
39        ${CLASSWORLDS_LAUNCHER} \
40        ${@}
41
42 (The full script:
43 http://overlays.gentoo.org/proj/java/browser/gsoc-maven-overlay/dev-java/maven/files/2.2.1/bin/mvn)
44
45 And, m2.conf file looks like this:
46 =======
47 main is org.apache.maven.cli.compat.CompatibleMain from plexus.core
48
49 set maven.home default ${user.home}/m2
50
51 [plexus.core]
52 load ${maven.home}/lib/*.jar
53 ========
54
55 Let me know if any more information is needed
56
57 Thanks,
58 --Kasun
59
60 --
61 ~~~*******'''''''''''''*******~~~
62 Kasun Gajasinghe,
63 University of Moratuwa,
64 Sri Lanka.
65 Blog: http://blog.kasunbg.org
66 Twitter: http://twitter.com/kasunbg

Replies

Subject Author
[gentoo-java] Re: [mvn-intg] maven-from-source : An issue when invoking mvn "Jörg Schaible" <joerg.schaible@×××.de>