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, gentoo-java@lists.gentoo.org
Subject: Re: [gentoo-java] Re: [mvn-intg] maven-from-source : An issue when invoking mvn
Date: Thu, 30 Jun 2011 07:59:29 +0530	[thread overview]
Message-ID: <BANLkTi=cRozUVu1VjHMqD7OY376jrTE3Tg@mail.gmail.com> (raw)
In-Reply-To: <iug4mi$avh$1@dough.gmane.org>

Jörg,

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'!

http://pastebin.com/NMp7ULXx

More comments below...

On Thu, Jun 30, 2011 at 2:46 AM, Jörg Schaible <joerg.schaible@gmx.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:
>> http://overlays.gentoo.org/proj/java/browser/gsoc-maven-overlay/dev-
> 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:
http://overlays.gentoo.org/proj/java/browser/gsoc-maven-overlay/dev-java/maven/maven-2.2.1.ebuild#L152
http://overlays.gentoo.org/proj/java/browser/gsoc-maven-overlay/eclass/java-maven-2.eclass#L93

>
> 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: http://blog.kasunbg.org
Twitter: http://twitter.com/kasunbg



WARNING: multiple messages have this Message-ID (diff)
From: Kasun Gajasinghe <kasunbg@gmail.com>
To: gentoo-java@lists.gentoo.org, gentoo-java@gentoo.org
Subject: Re: [gentoo-java] Re: [mvn-intg] maven-from-source : An issue when invoking mvn
Date: Thu, 30 Jun 2011 07:59:29 +0530	[thread overview]
Message-ID: <BANLkTi=cRozUVu1VjHMqD7OY376jrTE3Tg@mail.gmail.com> (raw)
Message-ID: <20110630022929.vDsOPmRed7Due2DLmm9cI5hPq8nP0fnSci1sj7B_wbQ@z> (raw)
In-Reply-To: <iug4mi$avh$1@dough.gmane.org>

Jörg,

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'!

http://pastebin.com/NMp7ULXx

More comments below...

On Thu, Jun 30, 2011 at 2:46 AM, Jörg Schaible <joerg.schaible@gmx.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:
>> http://overlays.gentoo.org/proj/java/browser/gsoc-maven-overlay/dev-
> 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:
http://overlays.gentoo.org/proj/java/browser/gsoc-maven-overlay/dev-java/maven/maven-2.2.1.ebuild#L152
http://overlays.gentoo.org/proj/java/browser/gsoc-maven-overlay/eclass/java-maven-2.eclass#L93

>
> 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: http://blog.kasunbg.org
Twitter: http://twitter.com/kasunbg



  reply	other threads:[~2011-06-30  2:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-29  8:59 [gentoo-java] [mvn-intg] maven-from-source : An issue when invoking mvn Kasun Gajasinghe
2011-06-29 21:16 ` [gentoo-java] " Jörg Schaible
2011-06-30  2:29   ` Kasun Gajasinghe [this message]
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=cRozUVu1VjHMqD7OY376jrTE3Tg@mail.gmail.com' \
    --to=kasunbg@gmail.com \
    --cc=gentoo-java@lists.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