Gentoo Archives: gentoo-java

From: Kasun Gajasinghe <kasunbg@×××××.com>
To: gentoo-java@l.g.o, gentoo-java@g.o
Subject: Re: [gentoo-java] Re: [mvn-intg] maven-from-source : An issue when invoking mvn
Date: Thu, 30 Jun 2011 02:30:32
In Reply to: [gentoo-java] Re: [mvn-intg] maven-from-source : An issue when invoking mvn by "Jörg Schaible"

Thanks for the suggestions. I was able to get over this issue at last.
It's probably because I haven't given priority to maven-compat (which
has the class org.apache.maven.cli.compat.CompatibleMain) over other
(symlinked) packages. I've renamed it to 01_maven-compat.jar. I've
tried the your suggestions as well, may be the CRLF case played a part
here too!

Right now, `mvn-2 clean` works _with_ a pre-setup m2 repo with
necessary plugins! ;)
There's this error pops up when trying 'clean' with an empty m2 repo.
'mvn compile' fails whether or not the needed plugins already
available. I'm trying to track down this error now. It's failing
either because it does not try to download needed jars or some version
mismatch (which I doubt) triggering NoSuchMethodError or because of a
missing component. If you have any inputs, please let me know.

The generated component
org.sonatype.plexus.components.sec.dispatcher.SecDispatcher is of type
'default' not 'maven'!

More comments below...

On Thu, Jun 30, 2011 at 2:46 AM, Jörg Schaible <joerg.schaible@×××.de> wrote:

> >> 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: >> > java/maven/files/2.2.1/bin/mvn) > > Explain __MAVENHOME__ and __MAVEN_SHARE__.
JAVA_MAVEN_SYSTEM_HOME="/usr/share/maven-${JAVA_MAVEN_VERSION}/maven_home" MAVEN=${PN}-${SLOT} MAVEN_SHARE="/usr/share/${MAVEN}" __MAVENHOME__ get replaced by JAVA_MAVEN_SYSTEM_HOME and other one respectively in src_unpack phase. See:
> > I am also wondering about: > >> -Dmaven.repo.remote=${HOME}/.m2/repository \ >> -Dmaven.repo.local=${HOME}/.m2/repository  \ > > Note, that the format of the meta data in a remote and a local repo > *differs*. AFAICS you cannot have both at the same location. Why not have > one single system-wide remote repo, that is "stuffed" with the Gentoo- > installed libraries only? Simply add that to > /usr/share/maven-2.2/conf/settings.xml in an always active profile named > e.g. "gentoo-system".
Yes, I think we should remove -Dmaven.repo.remote=${HOME}/.m2/repository. Actually, remote repo refers to a server which we generally via http protocal anyway, right? User can provide the remote repo via settings.xml later on. what do you mean by "system-wide remote repo"? Currently we have a system wide _local_ repo at /usr/share/maven-2/maven_home/gentoo-repo. Thanks, --Kasun -- ~~~*******'''''''''''''*******~~~ Kasun Gajasinghe, University of Moratuwa, Sri Lanka. Blog: Twitter: