views:

33

answers:

3

I use maven to build projects and it gets stuck at ftp.cica.es/mirrors/maven2 repository. What is the way around it?

A: 

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

naikus
+2  A: 

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&lt;/url&gt;
  <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.

Pascal Thivent
+1  A: 

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.

crowne
Thanks for the tip, we just installed Artifactory http://www.jfrog.org/products.php
sheki