Put the jars in your local repository - system scope should be avoided.

In your parent pom.xml:

<project>
 <groupId>com.xyz</groupId>
 <artifactId>abc-parent</artifactId>
 ...
 <!-- modules will inherit dependency settings like version and scope -->
 <dependencyManagement>
   <dependencies>
     <dependency>
       <groupId>com.xyz</groupId>
       <artifactId>abc</artifactId>
       <version>3.5.1</version>
     </dependency>
   </dependencies>
 </dependencyManagement>
 ...
</project>


in your modules' pom.xml:

<project>
 <parent>
   <groupId>com.xyz</groupId>
   <artifactId>abc-parent</artifactId>
 </parent>
 ...
 <dependencies>
   <dependency>
     <groupId>junit</groupId>
     <artifactId>junit</artifactId>
   </dependency>
 </dependencies>
 ...
</project>

On 5/30/07, Damon Rand <[EMAIL PROTECTED]> wrote:
Hi,

I've spent all afternoon working on this but am stuck.. I am building
several wars that all depend on the same set of 3rd party jar files. I
could write a batch file to install the jars to my local repos and
then copy and paste the list of dependencies into each war. But what I
really want is to be able to depend on a single mydependencies/pom.xml
project instead. I tried getting maven to install my jars using the
systemPath variable like this but it didn't work.

<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";>
        <parent>
                <groupId>com.xyz</groupId>
                <artifactId>abc-parent</artifactId>
                <version>3.5.1-SNAPSHOT</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <artifactId>mydependencies</artifactId>
        <packaging>jar</packaging>
        <name>mydependencies</name>
        <build></build>
        <dependencies>
                <dependency>
                        <groupId>com.xyz</groupId>
                        <artifactId>abc</artifactId>
                        <version>3.5.1</version>
                        <scope>system</scope>
                        <systemPath>${basedir}/lib/abc.jar</systemPath>
                </dependency>
        </dependencies>
</project>

I've read all about dependencyManagement and installing 3rd party jars
but its just not clicking..


Regards,
Damon.

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




--
Robert Dale

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

Reply via email to