I use maven to build projects and it gets stuck at ftp.cica.es/mirrors/maven2 repository. What is the way around it?
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
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.
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.