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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Clément Guillaume
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,
Reply | Threaded
Open this post in threaded view
|

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

Piotr Żygieło
On Tue, 12 May 2020 at 00:46, Clément Guillaume <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]