Stephen,
I believe I followed your suggestion, but it still doesn't work - Maven
doesn't see my HTTP repository out on Tomcat.
As far as I can tell, I've activated the profile, but Maven acts like I
haven't
So, here's an excerpt from my top-level POM:

---
<project xmlns="http://maven.apache.org/POM/4.0.0"; 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
    xsi:schemaLocation="http://maven.apache.org/maven-v4_0_0.xsd";>

    <modelVersion>4.0.0</modelVersion>
    <name>Acme</name>
    <groupId>acme</groupId>
    <version>1.0-SNAPSHOT</version>
    <artifactId>portal</artifactId>
    <packaging>pom</packaging>

    <inceptionYear>2005</inceptionYear>
    <description>Acme Portal</description>
    <url>http://www.acme.com/</url>

    <modules>
        <module>...</module>
        ...
    </modules>

    <organization>
        <name>Acme</name>
        <url>http://www.acme.com/</url>
    </organization>

    <developers>
        <developer>
            <name>Fred Smithr</name>
            <id>fsmtih</id>
            <email>[EMAIL PROTECTED]</email>
            <organization>Acme</organization>
        </developer>
    </developers>
    
    <profiles>
      <profile>
        <activation>
          <activeByDefault/>
        </activation>
        <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>

    <build>
      ...
    </build>
    ...
</project>
---

Do you haven any ideas? Am I missing something? What did I do wrong? Thanks
for your help.

Tom

-----Original Message-----
From: Stephen Duncan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 11, 2005 9:46 AM
To: Maven Users List
Subject: Re: M2 and Remote HTTP Repo on Tomcat

That is the right way, and that is the purpose of having the remote
repository.  You still have to have the local repository to have a copy of
the jars for compiling, etc.  The configuration you have sets you up to
download from that HTTP repository to the local respository when retrieving
dependencies.

Yes, I think you can get away with just copying your local repository to the
server to initially set up your remote repository.  Generally I've used m2
deply with distributionManagement configured to scp to the remote
repository.  To get the Sun jars in, I took the POM from ibibilio, added the
distributionManagement section, downloaded the jar, and set up the following
folder structure (using mail as an
example):

>mail
   pom.xml
       >target
            mail-1.3.2.jar

Then run m2 deploy:deploy from the mail directory.

-Stephen

On 10/11/05, Marrs, Thomas <[EMAIL PROTECTED]> wrote:
> OK, then why have a remote/shared repository? I thought that the whole 
> idea
> *was* to replace the local repository - we want a common place with 
> all the same JARs so we're all looking at the same thing.
> The main reason I wanted a shared repository is that I don't want to 
> walk everyone through the tedious process of adding all the Sun JARs 
> (JDBC, JTA,
> JSF) to each local repository. If this is wrong, then what's the right
way?
>
> So, what's the process for setting up a remote repository? Do I just 
> copy the contents of my local repository to the repository directory 
> under CATALINA_HOME?
>
> Tom
>
> -----Original Message-----
> From: Stephen Duncan [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 11, 2005 9:31 AM
> To: Maven Users List
> Subject: Re: M2 and Remote HTTP Repo on Tomcat
>
> Remote repositories are for sharing artifacts between users.  They are 
> not a replacement for the local repository.
>
> -Stephen
>
> On 10/11/05, Marrs, Thomas <[EMAIL PROTECTED]> 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.
> > 2) Installed Tomcat.
> > 3) Added a repository directory under $CATALINA_HOME
> > 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>
> >
> >     <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?? Have I 
> > done something wrong? Should I be doing something else? Thanks for 
> > your
> help.
> >
> > Tom
> >
> >
>
>
> --
> Stephen Duncan Jr
> www.stephenduncanjr.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> The information in this electronic mail message is sender's business 
> Confidential and may be legally privileged. It is intended solely for 
> the addressee(s). Access to this Internet electronic mail message by 
> anyone else is unauthorized. If you are not the intended recipient, 
> any disclosure, copying, distribution or any action taken or omitted 
> to be taken in reliance on it is prohibited and may be unlawful.
> The sender believes that this E-mail and any attachments were free of 
> any virus, worm, Trojan horse, and/or malicious code when sent. This 
> message and its attachments could have been infected during 
> transmission. By reading the message and opening any attachments, the 
> recipient accepts full responsibility for taking protective and 
> remedial action about viruses and other defects. Cendant is not liable 
> for any loss or damage arising in any way from this message or its
attachments.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Stephen Duncan Jr
www.stephenduncanjr.com

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

The information in this electronic mail message is sender's business
Confidential and may be legally privileged. It is intended solely for the
addressee(s). Access to this Internet electronic mail message by anyone else
is unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution or any action taken or omitted to be taken in reliance
on it is prohibited and may be unlawful.  
The sender believes that this E-mail and any attachments were free of any
virus, worm, Trojan horse, and/or malicious code when sent. This message and
its attachments could have been infected during transmission. By reading the
message and opening any attachments, the recipient accepts full
responsibility for taking protective and remedial action about viruses and
other defects. Cendant is not liable for any loss or damage arising in any
way from this message or its attachments.

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

Reply via email to