You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Howard Lewis Ship <hl...@gmail.com> on 2007/08/24 21:42:19 UTC

Overriding the local repository

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.



-- 
Howard M. Lewis Ship
Partner and Senior Architect at Feature50

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Overriding the local repository

Posted by Johan Lindquist <jo...@kawoo.co.uk>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Overriding the local repository

Posted by Chuck Canning <cc...@ccanning.com>.
Use your settings.xml and add something like this:

<settings>
  <localRepository>path to my local repository</localRepository>
</settings>


On 8/24/07, Wendy Smoak <ws...@gmail.com> wrote:
>
> On 8/24/07, Howard Lewis Ship <hl...@gmail.com> 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:
>
> It works for me.  It's what I use to test 'does this build with a
> clean local repo' to make sure all necessary dependencies are
> available in a remote repo.
>
> > [INFO]
> ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> ------------------------------------------------------------------------
> > [INFO] Failed to resolve artifact.
> >
> > Missing:
> > ----------
> > 1) org.codehaus.plexus:plexus-utils:jar:1.1
>
> Strange, since it's right there:
> http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/
>
> In the build output, I don't see it downloading anything at all, as if
> it can't connect to any remote repos.
>
> That it works if you don't specify a different local repo makes
> sense-- it already has the artifacts in the local repo and doesn't
> need to download them.
>
> (BTW, I opened MNG-3165 to publish the 2.0.7 reference docs. I'm ssh
> key-less at the moment, haven't moved everything over to the new
> laptop yet.)
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Overriding the local repository

Posted by Wendy Smoak <ws...@gmail.com>.
On 8/24/07, Howard Lewis Ship <hl...@gmail.com> 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:

It works for me.  It's what I use to test 'does this build with a
clean local repo' to make sure all necessary dependencies are
available in a remote repo.

> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO] ------------------------------------------------------------------------
> [INFO] Failed to resolve artifact.
>
> Missing:
> ----------
> 1) org.codehaus.plexus:plexus-utils:jar:1.1

Strange, since it's right there:
http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/

In the build output, I don't see it downloading anything at all, as if
it can't connect to any remote repos.

That it works if you don't specify a different local repo makes
sense-- it already has the artifacts in the local repo and doesn't
need to download them.

(BTW, I opened MNG-3165 to publish the 2.0.7 reference docs. I'm ssh
key-less at the moment, haven't moved everything over to the new
laptop yet.)

-- 
Wendy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org