Re: Re: [mvn-intg] maven-from-source : An issue when invoking mvn

Jörg Schaible <[email protected]> Thu, 30 Jun 2011 20:45:47 +0200
Newsgroups gmane.linux.gentoo.java
Message-ID <[email protected]>
Hi,

Kasun Gajasinghe wrote:

just answering for the repo for now ...

[snip]

>>
>> I am also wondering about:
>>
>>> -Dmaven.repo.remote=3D${HOME}/.m2/repository \
>>> -Dmaven.repo.local=3D${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 h=
ave
>> 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 nam=
ed
>> e.g. "gentoo-system".
>=20
> Yes, I think we should remove
> -Dmaven.repo.remote=3D${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.
>=20
> 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 r=
epo=20
between different users reliably. Additionally this is the repo the curre=
nt=20
user *writes to* even if he downloads something (this is already critical=
 if=20
you use M3's parallel build). Therefore you will have to establish a syst=
em-
wide *remote* repo that is filled up with the Gentoo-built stuff. If that=
=20
one is referred as remote repo in the settings.xml of the current Maven=20
installation, it is always considered independently of a user's own=20
repository declarations in his settings.xml.

In the end it means that the different local repo's will always contain=20
copies. Note, that it is for a developer a quite common task to wipe the=20
local repo from time to time.

If you set "maven.repo.remote", you overwrite Maven Central i.e. Maven's=20
default repo, but it will not prevent other remote lookups. If you want t=
o=20
ensure that Maven is not using something else during ebuilds, you should =
use=20
a special settings.xml anyway that declares the system-wide *remote* repo=
 as=20
mirror for everything ...

- J=C3=B6rg