[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#35462: maven ignoring mirror-settings in ~/.m2/settings.xml
From: |
Julien Lepiller |
Subject: |
bug#35462: maven ignoring mirror-settings in ~/.m2/settings.xml |
Date: |
Tue, 30 Apr 2019 12:57:05 +0200 |
Le Sat, 27 Apr 2019 22:53:37 +0200,
Arne Babenhauserheide <address@hidden> a écrit :
> Hi,
>
> When I set a mirror in ~/.m2/settings.xml, that mirror is not used by
> the maven in Guix.
>
> To reproduce:
>
> mkdir -p ~/.m2/
> echo '
> <settings>
> <servers>
> <server>
> <id>internal</id>
> <username>foo</username>
> <password>bar</password>
> </server>
> </servers>
> <mirrors>
> <mirror>
> <id>nexus</id>
> <name>nexus</name>
> <url>http://nexus.example.com/nexus/content/groups/public/</url>
> <mirrorOf>*</mirrorOf>
> </mirror>
> </mirrors>
> </settings>
> ' > ~/.m2/settings.xml
> # run maven somewhere
>
> With this setting, maven should run every request through the
> configured nexus (which in this case means that any try to download
> should fail).
>
> In my setup, maven just ignores this setting and keeps downloading
> from repo.maven.apache.org which (a) could leak internal information
> and (b) does not get our internal packages.
>
> Best wishes,
> Arne
Hi,
I've given a look at this bug and it seems that our maven package
totally ignores settings, even if given on the CLI:
mvn help:effective-settings --debug -s ~/.m2/settings.xml
-gs ~/.m2/settings.xml
has no effect...
strace -f mvn ... doesn't show any reference to a settings.xml either
(not even the globabl one in the store...).