maf123sp
maf123sp

Reputation: 1

Maven - site plugin uses wrong repository

in my maven project I use a customer repository. This repo is specified in the .m2/settings.xml file. The mvn clean install test works perfectly - in .m2/repository only the customer repository is used. The custtom repository forward requests to a public repo, which is NOT repo.maven.apache.org.

From my view, the project settihngs are correct as well the.

As soon I try to trigger the site-plugin the build runs into an error. "Failed to transfer file from: http://repo.maven.apache.org/maven2 ...." Obviously the site plugin tries to load artifacts with (used) version numbers (and therefore net yet loaded into the local repo) from the official maven repo. It ignores all my settings.

I don't have any idea, how to solve this issue. I use maven 3.2.1, and the site plugin 3.7.1. Of course - those version numbers are out of any discussion :-)

Is there any plugin specific setting on site plugin which I can use, to provide my custom repo? Is there any chance to route the repo.maven.apache.org request to my customer repo?

Thanks for any help

Changes on settings... Checks for site-plugin configuration... Tried other commands on site-plugin.. Tried to add dependencies on site plugin (now it finds the artifacts in local repo, but there are too many artifacts - it is not a accepted solution) ...

Upvotes: 0

Views: 115

Answers (1)

J Fabian Meier
J Fabian Meier

Reputation: 35805

You need to add a mirror entry to the settings.xml, with <mirrorOf>*</mirrorOf> to redirect all requests.

Upvotes: 0

Related Questions