Gentoo Archives: gentoo-java

From: "Jörg Schaible" <joerg.schaible@×××.de>
To: gentoo-java@l.g.o
Subject: [gentoo-java] Re: Re: [mvn-intg] maven-from-source : An issue when invoking mvn
Date: Thu, 30 Jun 2011 18:46:53
Message-Id: iuig8r$l28$
In Reply to: Re: [gentoo-java] Re: [mvn-intg] maven-from-source : An issue when invoking mvn by Kasun Gajasinghe

Kasun Gajasinghe wrote:

just answering for the repo for now ...


>> >> 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?
Any valid URL can do. Even using "file:" protocol.
> 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.
Every user will have to use an own local repo. You cannot share a local repo between different users reliably. Additionally this is the repo the current user *writes to* even if he downloads something (this is already critical if you use M3's parallel build). Therefore you will have to establish a system- wide *remote* repo that is filled up with the Gentoo-built stuff. If that one is referred as remote repo in the settings.xml of the current Maven installation, it is always considered independently of a user's own repository declarations in his settings.xml. In the end it means that the different local repo's will always contain copies. Note, that it is for a developer a quite common task to wipe the local repo from time to time. If you set "maven.repo.remote", you overwrite Maven Central i.e. Maven's default repo, but it will not prevent other remote lookups. If you want to ensure that Maven is not using something else during ebuilds, you should use a special settings.xml anyway that declares the system-wide *remote* repo as mirror for everything ... - Jörg