Rpj
Rpj

Reputation: 6090

Does gradle use mirror settings in .m2/settings.xml

Does gradle use mirror settings in ~/.m2/settings.xml? We have a <mirror> pointing to artifacts from ProjectA. We don't want to point to the same mirror for ProjectB.

Does ProjectB specific artifacts get resolved via that <mirror>, if so how should we prevent this?

Upvotes: 2

Views: 2132

Answers (1)

Thomas K.
Thomas K.

Reputation: 6770

As far as I know ~/.m2/settings.xml is only consulted to find the location of the local maven repository (mavenLocal() in Gradle).

So to answer your question:

Does gradle use mirror settings in ~/.m2/settings.xml?

No, it does not. Gradle not only has it's own way to define repository locations, it is also possible to specify multiple locations within the repositories { } configuration.

Upvotes: 1

Related Questions