Hi, You can do that through your settings.xml file (using the <localRepository/> tag) but of course that won't help if you are looking at a runtime option.
Johan Howard Lewis Ship wrote: > Is there a way to control what the local repository is? I've done > some searching found -Dmaven.repo.local, but it doesn't work: > > $ mvn install -Dmaven.repo.local=~/.m2/alt-repository > [INFO] Scanning for projects... > [INFO] Reactor build order: > [INFO] Mediabank Liberte Master Project > [INFO] MBCore > [INFO] MBData > [INFO] MBBusinessCore > [INFO] MBCoreUI > [INFO] MBComm > [INFO] MBAnalogBusiness > [INFO] MBLiberteBusiness > [INFO] MBLiberteClient > [INFO] MBLiberteServer > [INFO] Mediabank Application Launcher > [INFO] Mediabank QA Staging > Downloading: > http://mgdevsupport.mbxg.internal/maven-repository/org/apache/maven/wagon/wagon-ftp/1.0-beta-2/wagon-ftp-1.0-beta-2.pom > Downloading: > http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ftp/1.0-beta-2/wagon-ftp-1.0-beta-2.pom > Downloading: > http://mgdevsupport.mbxg.internal/maven-repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.pom > Downloading: > http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.pom > Downloading: > http://mgdevsupport.mbxg.internal/maven-repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar > Downloading: > http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar > Downloading: > http://mgdevsupport.mbxg.internal/maven-repository/org/apache/maven/wagon/wagon-ftp/1.0-beta-2/wagon-ftp-1.0-beta-2.jar > Downloading: > http://repo1.maven.org/maven2/org/apache/maven/wagon/wagon-ftp/1.0-beta-2/wagon-ftp-1.0-beta-2.jar > [INFO] > ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] Failed to resolve artifact. > > Missing: > ---------- > 1) org.codehaus.plexus:plexus-utils:jar:1.1 > > Try downloading the file manually from the project website. > > Then, install it using the command: > mvn install:install-file -DgroupId=org.codehaus.plexus > -DartifactId=plexus-utils \ > -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file > Alternatively, if you host your own repository you can deploy the file > there: mvn deploy:deploy-file -DgroupId=org.codehaus.plexus > -DartifactId=plexus-utils \ > -Dversion=1.1 -Dpackaging=jar -Dfile=/path/to/file \ > -Durl=[url] -DrepositoryId=[id] > > Path to dependency: > 1) com.mediabank.liberte:liberte-project:pom:1.0.0-SNAPSHOT > 2) org.codehaus.plexus:plexus-utils:jar:1.1 > > 2) org.apache.maven.wagon:wagon-ftp:jar:1.0-beta-2 > > Try downloading the file manually from the project website. > > Then, install it using the command: > mvn install:install-file -DgroupId=org.apache.maven.wagon > -DartifactId=wagon-ftp \ > -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file > Alternatively, if you host your own repository you can deploy the file > there: mvn deploy:deploy-file -DgroupId=org.apache.maven.wagon > -DartifactId=wagon-ftp \ > -Dversion=1.0-beta-2 -Dpackaging=jar -Dfile=/path/to/file \ > -Durl=[url] -DrepositoryId=[id] > > Path to dependency: > 1) com.mediabank.liberte:liberte-project:pom:1.0.0-SNAPSHOT > 2) org.apache.maven.wagon:wagon-ftp:jar:1.0-beta-2 > > ---------- > 2 required artifacts are missing. > > for artifact: > com.mediabank.liberte:liberte-project:pom:1.0.0-SNAPSHOT > > from the specified remote repositories: > central (http://repo1.maven.org/maven2), > mgdevsupport (http://mgdevsupport.mbxg.internal/maven-repository) > > > [INFO] > ------------------------------------------------------------------------ > [INFO] For more information, run Maven with the -e switch > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 3 seconds > [INFO] Finished at: Fri Aug 24 12:35:42 PDT 2007 > [INFO] Final Memory: 1M/3M > [INFO] > ------------------------------------------------------------------------ > ~/datatech-workspace/liberte > $ > > The build works great if I don't specify a local repository (and it > uses the default), but if I try to overrride that, Maven acts as if > the remote artifacts were not available. This is Maven 2.0.7 on Mac > OS X. > > > -- you too? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
