Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My mvn build is trying to grab the following file from an online repository.


However, that URL no longer exists.

I have the maven-metadata.xml file saved locally, but how can I modify my POM file to get the file locally?

Here's where my config file specifies this bad URL to find the file.


     <distributionManagement>    <!-- Declare the release repository to deploy the 
.zip file to -->
         <!-- Declare the snapshot repository to deploy the .zip file to -->
share|improve this question

Any quick fix will just be temporary; you will run into the same problem over & over again, and have a hard time manually managing the situation. The easiest & most robust solution to this issue (and related problems: missing dependencies, down servers, working disconnected) are all easily remedied by simply installing your own local maven repository. (And it really is simple: nexus is IMO the easiest.)

Once this is done (as simple as unzip & start the server), then point all your maven projects to this local server. (It can be on localhost, or another server on your network.) Assuming nexus for the moment, configure it to be a mirror of all the remote repo's you use. It'll cache these artifacts for you, speeding up new builds on new projects and/or new servers. And now you can push (deploy) to this server too, to share your artifacts with your other maven projects. Things can be staged here & tested (e.g,. jenkins/hudson) before deployed to a public repository (if you do that).

Just remember:

  • any non-snapshot artifacts only have one checksum (sha1/md5) and should always be universally unique -- so it doesn't matter if they come from your local mirror or real remote. (Don't generate the same release artifact more than once.)
  • don't put repository info in your pom; put all that in settings.xml : either ~/.m2/settings.xml or run maven with mvn -s path/to/my/settings.xml
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.