You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Clément Guillaume <cl...@guillaume.bzh> on 2020/05/11 22:45:43 UTC

plugin snapshot dependencies cause unnecessary request to repository.apache.org

Hi,

It looks like when a plugin has a SNAPSHOT dependency, maven will try to
get it from repository.apache.org/snapshots.
How does maven knows about repository.apache.org/snapshots? I don't see
anything in the effective pom.
How can I get maven to not attempt to use repository.apache.org/snapshots?
(I want it to load the SNAPSHOT from local or from a private repository).

I have made a small example to reproduce the issue.
https://github.com/guillaumecle/apache-repo
Everything is done in a docker image to avoid any impact from a personal
settings.xml file.
There are 2 projects. main-project has the clean plugin that depends on
extra-project:0.0.1-SNAPSHOT.
When doing maven clean -U we can see the download:

> Downloading from apache.snapshots:
> https://repository.apache.org/snapshots/bzh/guillaume/extra-project/0.0.1-SNAPSHOT/maven-metadata.xml


I have verified that this is happening with at least 2 plugins: clean and
maven-checkstyle-plugin.

Thank you,

Re: plugin snapshot dependencies cause unnecessary request to repository.apache.org

Posted by Piotr Żygieło <pi...@gmail.com>.
On Tue, 12 May 2020 at 00:46, Clément Guillaume <cl...@guillaume.bzh> wrote:
> It looks like when a plugin has a SNAPSHOT dependency, maven will try to
> get it from repository.apache.org/snapshots.
> How does maven know about repository.apache.org/snapshots? I don't see
> anything in the effective pom.

maven-clean-plugin inherits apache.snapshots pluginRepository from
org.apache:apache (and central from super pom).

-- 
Piotrek

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org