Hello, 

We have several projects that share common dependencies. I wanted to create
a parent pom that allowed them to inherit these dependencies, but from what
I can tell all the projects would need to be sub-projects of the parent to
inherit the parent pom (not what we want). Digging around in the archives I
found a thread that (loosely) described installing a pom that contains all
the common dependencies, and then adding a reference to that artifact in
your pom, making sure to reference it as <type>pom</type>. This works when I
install it to my local repository. However, when I try to deploy it to our
Internal repository, only the project description gets uploaded, without the
dependencies. 

for example, here is a snippet of what gets installed locally:

...     
<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/POM/4.0.0
 http://maven.apache.org/maven-v4_0_0.xsd";>
        <modelVersion>4.0.0</modelVersion>
<groupId>com.foo</groupId>
        <artifactId>common-dependencies</artifactId>
        <packaging>pom</packaging>
        <version>1.0</version>
        <dependencies>
                 <dependency>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                    <version>1.2.12</version>
                </dependency>
                <dependency>
                        <groupId>axis</groupId>
                        <artifactId>axis</artifactId>
                        <version>1.3</version>
                        <scope>compile</scope>
                </dependency>
...

and here is what gets deployed to the Internal repository:

<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.foo</groupId>
  <artifactId>common-dependencies</artifactId>
  <packaging>pom</packaging>
  <version>1.0</version>
</project>

I use the following command to deploy it to the Internal repos:
mvn deploy:deploy-file -DgroupId=com.foo -DartifactId=common-dependencies
-Dversion=1.0 -Dpackaging=pom -Dfile=c:/poms/common-dependencies.xml
-Durl=http://ourinternalrepos:8080/archiva/repository/internal
-DrepositoryId=internal  -Dgenerate-pom=true

How do I get the dependencies included with the pom on the Internal
repository? I read the docs and it seems like the deploy:deploy-file target
should be used to install to an Internal repos, while install:install-file
is for local repos. 
-- 
View this message in context: 
http://www.nabble.com/Deploy-pom-with-dependencies-to-internal-repository-tp16258021s177p16258021.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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

Reply via email to