On Tue, 2005-10-11 at 11:25 -0400, Marrs, Thomas wrote:
> Hi,
> I'm trying to setup a shared/remote HTTP-based repository on Tomcat, but I
> can't make it work. Here are the steps I've taken:
> 
> 1) Removed my local M2 repository.

You don't want to do that.

This is for m1 (I'm tweaking it now for m2) but should give you some
background on internal repositories. You need both as artifacts move
from remote repositories to local repositories and artifacts are always
used from your local repository. But we need to get them there first. I
will explain this better in the m2 doco.

> 2) Installed Tomcat.

Cool. Any webserver will do.

> 3) Added a repository directory under $CATALINA_HOME

I think you'll need to edit a configuration file, but I'm not sure what
version of Tomcat you're using.

> 4) Modified my top-level POM as follows:
> 
> ---
> ...
>     <build>
>       ...
>     </build>
>     
>     <profiles>
>       <profile>
>         <repositories>
>           <repository>
>             <id>shared</id>
>             <name>shared</name>
>             <url>http://localhost:18080/repository</url>
>           </repository>
>           <repository>
>             <id>repo1</id>
>             <name>repo1</name>
>             <url>http://repo1.maven.org</url>
>           </repository>
>         </repositories>
>       </profile>
>     </profiles>

This is for pulling remotely. Here's some doco on deployment:

http://people.apache.org/~jvanzyl/maven2/guides/getting-
started/index.html#How%20do%20I%20deploy%20my%20jar%20in%20my%20remote%
20repository?

>     <dependencyManagement>
>       ...
>     </dependencyManagement>
> ---
> The 
> When I run "m2 install" it ignores the remote repository on Tomcat, and
> starts installing the JARs to my local repository. Why?? 

You need to specify a <distributionManagement/> element.

> Have I done
> something wrong? Should I be doing something else? Thanks for your help.
> 
> Tom
-- 
jvz.

Jason van Zyl
jason at maven.org
http://maven.apache.org

happiness is like a butterfly: the more you chase it, the more it will
elude you, but if you turn your attention to other things, it will come
and sit softly on your shoulder ...

 -- Thoreau 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to