You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Baptiste MATHUS <ml...@batmat.net> on 2009/01/01 21:42:26 UTC

Re: Simple question I think - how can I default to local repo if connection to internal repository is down?

Hi Rick,

If you're using an internal repository, you should not define other
repositories inside your settings.xml. You really better want to do this
configuration inside your internal maven repository manager. This might be
one of the causes of your problems.

But also note that you're right: maven has an local repository (see it as a
cache) from where the jars will be used if they're already present. So, if
you're encountering problems building although no dependency was changed and
the jars were previously downloaded, you should report here more precisely
the error you have so that we can help you.

Cheers.

2008/12/30 Rick <ri...@gmail.com>

> I've googled this and tried to search the archives but it's hard to
> get a direct hit.
>
> We are using an internal repository but if for some reason that
> repository goes down, isn't there a way the maven build can still
> proceed using the files in the user's local repository (assuming of
> course the pom hasn't changes and dependencies since they last were
> connected.) Right now, if that internal repository is down, the builds
> will not work. My repository definitions look like this (I know there
> is debate about where to put the repository info, but I like it in the
> project's parent pom instead of on the user's machine.):
>
> <repositories>
>     <repository>
>         <id>central</id>
>         <url>http://company-repo-IP:8081/artifactory/repo</url>
>         <snapshots>
>             <enabled>false</enabled>
>         </snapshots>
>     </repository>
>     <repository>
>         <id>snapshots</id>
>         <url>http://company-repo-IP:8081/artifactory/repo</url>
>         <releases>
>             <enabled>false</enabled>
>         </releases>
>     </repository>
>     <repository>
>         <id>maven2-repository.dev.java.net</id>
>         <name>Java.net Repository for Maven</name>
>         <url>http://download.java.net/maven/2/</url>
>         <layout>default</layout>
>     </repository>
>     <repository>
>         <id>maven2-repository.dev.java.net</id>
>         <name>Java.net Repository for Maven</name>
>         <url>http://download.java.net/maven/2/</url>
>         <layout>default</layout>
>     </repository>
>     <repository>
>         <id>jboss.net repo</id>
>         <name>Java.net Repository for Maven</name>
>         <url>http://repository.jboss.org/maven2</url>
>         <layout>default</layout>
>     </repository>
>  </repositories>
>  <pluginRepositories>
>     <pluginRepository>
>         <id>central</id>
>         <url>http://company-repo-IP:8081/artifactory/plugins-releases
> </url>
>         <snapshots>
>             <enabled>false</enabled>
>         </snapshots>
>     </pluginRepository>
>     <pluginRepository>
>         <id>snapshots</id>
>         <url>http://company-repo-IP:8081/artifactory/plugins-snapshots
> </url>
>         <releases>
>             <enabled>false</enabled>
>         </releases>
>     </pluginRepository>
>  </pluginRepositories>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !