I use maven to build projects and it gets stuck at ftp.cica.es/mirrors/maven2 repository. What is the way around it?
3 Answers
http://ftp.cica.es/mirrors/maven2 is actually a mirror of the central repository and you very likely have a snippet like this in your settings.xml
:
<mirror>
<id>cica.es</id>
<url>http://ftp.cica.es/mirrors/maven2</url>
<mirrorOf>central</mirrorOf>
<!-- Spain, Sevilla -->
</mirror>
If this mirror is down, remove the above snippet and just use the central repository (or another mirror).
But at the time of writing this, it seems to just work fine.

- 562,542
- 136
- 1,062
- 1,124
Maven has an option for offline build. But the dependencies that were not already downloaded for your project will not be available and hence your build will fail.
maven -o package
The second option is to remove that repository from your pom.xml and add an alternate one where your dependencies are available

- 24,302
- 4
- 42
- 43
If you or co-developers in the same office are re-building the same projects often, then you'll do yourself a big favour by installing a maven repository manager such as Nexus.
Change your build settings to mirrorOf(*) = maven-repo-manager, initial build will be downloaded and cached in the repo-manager, and subsequent builds will resolve artifacts superfast from the cached local repository.
See the nexus setup steps this post.
-
Thanks for the tip, we just installed Artifactory http://www.jfrog.org/products.php – sheki Sep 21 '10 at 07:42