Help help, my central repository is blacklisted!
Posted by danielmeyer on July 21, 2008
The Artifactory server we use to serve as a Maven 2 Repository (did I get all my terms right?) is actually just a workstation-grade PC, and Artifactory is running in a window on that PC. I think we could set it up to run as a service, but the main development is now pointing to a different Artifactory server and I may be one of only a few still pointing to the old server. Anyway, when I came in today Artifactory wasn’t running. I tried running Maven with the eclipse:eclipse goal and the install goal, and kept getting errors like this:
[INFO] Scanning for projects…
[INFO] Searching repository for plugin with prefix: ‘eclipse’.
[INFO] org.apache.maven.plugins: checking for updates from central
[WARNING] repository metadata for: ‘org.apache.maven.plugins’ could not be retrieved from repository: central due to an error: Error transferring file
[INFO] Repository ‘central’ will be blacklisted
[INFO] ————————————————————————
[ERROR] BUILD ERROR
[INFO] ————————————————————————
…
(Emphasis mine.)
Well, I got the Artifactory server running again, but I still get the same error from Maven. I found a Maven for Newbies page that says this at the bottom:
Note: if you’ve tried and failed a few times, the central repository may have become blacklisted. Add the -U command line option to force an update.
Most of the postings to the Maven Users mailing list said similarly… but I checked and I’m already using the -U option!
Keith had me try renaming the .m2\repository folder and re-run the update, and that worked. (One post did suggest something like that (only I didn’t want to delete my whole .m2 directory, and didn’t end up needing to).)