From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-java+bounces-1681-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1Qbqd1-0008PI-BE
	for garchives@archives.gentoo.org; Wed, 29 Jun 2011 09:00:11 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 16DAD1C01C;
	Wed, 29 Jun 2011 08:59:28 +0000 (UTC)
Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52])
	by pigeon.gentoo.org (Postfix) with ESMTP id B4FAD1C01C
	for <gentoo-java@lists.gentoo.org>; Wed, 29 Jun 2011 08:59:27 +0000 (UTC)
Received: by fxd18 with SMTP id 18so1022558fxd.11
        for <gentoo-java@lists.gentoo.org>; Wed, 29 Jun 2011 01:59:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=mime-version:from:date:message-id:subject:to:cc:content-type
         :content-transfer-encoding;
        bh=FXL3OiADPKKfPitj6vE4EyMuD3kqynxLGrgruF+x/co=;
        b=v2TNoWNtACZd2rt4X6D6bGR7Y5dTDgCXISS2jdX/j6kfnRlNXAfkAJyCkeH/qqumOe
         p1CJUrapKnh7/ma7j8evcRdgQHuJudd7spw6cLJHZIPoEW2vDYiM86vPJh5A0cJ/DJ0S
         yDQ20nMzZsSgLRMDEo1OnM4bYGdpmoSMDm+zs=
Received: by 10.223.91.75 with SMTP id l11mr899061fam.66.1309337966756; Wed,
 29 Jun 2011 01:59:26 -0700 (PDT)
Precedence: bulk
List-Post: <mailto:gentoo-java@lists.gentoo.org>
List-Help: <mailto:gentoo-java+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-java+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-java+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-java.gentoo.org>
X-BeenThere: gentoo-java@lists.gentoo.org
Reply-To: gentoo-java@lists.gentoo.org
MIME-Version: 1.0
Received: by 10.223.73.207 with HTTP; Wed, 29 Jun 2011 01:59:06 -0700 (PDT)
From: Kasun Gajasinghe <kasunbg@gmail.com>
Date: Wed, 29 Jun 2011 14:29:06 +0530
Message-ID: <BANLkTi=LmmV2jymc5G-ToCgV5ebiu4PciQ@mail.gmail.com>
Subject: [gentoo-java] [mvn-intg] maven-from-source : An issue when invoking mvn
To: gentoo-java@lists.gentoo.org
Cc: kiorky <kiorky@cryptelium.net>, Serkan Kaba <serkan@gentoo.org>, 
	Alistair Bush <ali_bush@gentoo.org>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 
X-Archives-Hash: ae4a1cfc8d7c38fbe906e6f8dd6fa0c3

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 work=
ing.

$ 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:
=C2=A0 =C2=A0 =C2=A0 =C2=A0"${JAVACMD}" \
=C2=A0 =C2=A0 =C2=A0 =C2=A0$MAVEN_OPTS \
=C2=A0 =C2=A0 =C2=A0 =C2=A0-classpath $(java-config -p classworlds-1.1) \
=C2=A0 =C2=A0 =C2=A0 =C2=A0-Dclassworlds.conf=3D/usr/share/maven-2/maven_ho=
me/bin/m2.conf \  #the m2.
=C2=A0 =C2=A0 =C2=A0 =C2=A0-Dmaven.home=3D/usr/share/maven-2.2 \
=C2=A0 =C2=A0 =C2=A0 =C2=A0-Dmaven.repo.remote=3D${HOME}/.m2/repository \
=C2=A0 =C2=A0 =C2=A0 =C2=A0-Dmaven.repo.local=3D${HOME}/.m2/repository =C2=
=A0\
=C2=A0 =C2=A0 =C2=A0 =C2=A0${CLASSWORLDS_LAUNCHER} \
=C2=A0 =C2=A0 =C2=A0 =C2=A0${@}

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

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

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