public inbox for gentoo-java@lists.gentoo.org
 help / color / mirror / Atom feed
From: Kasun Gajasinghe <kasunbg@gmail.com>
To: gentoo-java@lists.gentoo.org
Cc: kiorky <kiorky@cryptelium.net>, Serkan Kaba <serkan@gentoo.org>,
	 Alistair Bush <ali_bush@gentoo.org>
Subject: [gentoo-java] [mvn-intg] maven-from-source : An issue when invoking mvn
Date: Wed, 29 Jun 2011 14:29:06 +0530	[thread overview]
Message-ID: <BANLkTi=LmmV2jymc5G-ToCgV5ebiu4PciQ@mail.gmail.com> (raw)

Hi,
After bumping more than 50 ebuilds, we were finally able to bump maven
package itself. But there's few issues to get over with.

Following error occurs when mvn-2.2 is invoked. As you probably
already know, maven uses classworlds-1.1 for class loading. Further,
upstream uses uberjar, which packages all the dependencies together.
We have circumvented the need for having an uberjar by creating
symlinks of needed jars under the directory /usr/share/maven-2.2/lib/.

As I see, it fails before getting in to maven through classworlds.
Unfortunately, I haven't have much experience with of classworlds
behaves. Does anyone of you have any idea to get rid of this error?
This _may_ not be an issue of maven having an incorrect classpath.

 If this is through, we'll be much closer to getting maven from source working.

$ mvn-2.2 -X
+ Error stacktraces are turned on.
Apache Maven 2.2.1 (r1135082; 2011-06-26 09:41:29+0530)
Java version: 1.6.0_25
Java home: /opt/sun-jdk-1.6.0.25/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux" version: "2.6.36-gentoo-r8" arch: "i386" Family: "unix"
org.codehaus.classworlds.NoSuchRealmException: plexus.core
	at org.codehaus.classworlds.ClassWorld.getRealm(ClassWorld.java:128)
	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:434)
	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)


Maven is called via classworlds with the command:
       "${JAVACMD}" \
       $MAVEN_OPTS \
       -classpath $(java-config -p classworlds-1.1) \
       -Dclassworlds.conf=/usr/share/maven-2/maven_home/bin/m2.conf \  #the m2.
       -Dmaven.home=/usr/share/maven-2.2 \
       -Dmaven.repo.remote=${HOME}/.m2/repository \
       -Dmaven.repo.local=${HOME}/.m2/repository  \
       ${CLASSWORLDS_LAUNCHER} \
       ${@}

(The full script:
http://overlays.gentoo.org/proj/java/browser/gsoc-maven-overlay/dev-java/maven/files/2.2.1/bin/mvn)

And, m2.conf file looks like this:
=======
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
========

Let me know if any more information is needed

Thanks,
--Kasun

--
~~~*******'''''''''''''*******~~~
Kasun Gajasinghe,
University of Moratuwa,
Sri Lanka.
Blog: http://blog.kasunbg.org
Twitter: http://twitter.com/kasunbg



             reply	other threads:[~2011-06-29  9:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29  8:59 Kasun Gajasinghe [this message]
2011-06-29 21:16 ` [gentoo-java] Re: [mvn-intg] maven-from-source : An issue when invoking mvn Jörg Schaible
2011-06-30  2:29   ` Kasun Gajasinghe
2011-06-30  2:29     ` Kasun Gajasinghe
2011-06-30  9:35     ` Kasun Gajasinghe
2011-06-30  9:35       ` Kasun Gajasinghe
2011-06-30 18:45     ` [gentoo-java] " Jörg Schaible

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='BANLkTi=LmmV2jymc5G-ToCgV5ebiu4PciQ@mail.gmail.com' \
    --to=kasunbg@gmail.com \
    --cc=ali_bush@gentoo.org \
    --cc=gentoo-java@lists.gentoo.org \
    --cc=kiorky@cryptelium.net \
    --cc=serkan@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox