Hi Marco, If you have a third-party JAR that you want your project(s) to depend on, you can install it into your local repository following the instructions here:
http://maven.apache.org/guides/mini/guide-installing-3rd-party-jars.html You can then include it as a dependency within your pom.xml as you would any other dependency, including setting the scope to "provided" HTH, Ian It's better to be hated for who you are than loved for who you are not Ian D. Stewart Appl Dev Analyst-Advisory, DCS Automation JPMorganChase Global Technology Infrastructure Phone: (614) 244-2564 Pager: (888) 260-0078 "Marco Mistroni" <[EMAIL PROTECTED] To: "Maven Users List" <[email protected]> com> cc: Subject: Re: Additional file sincluded while building an EAR 03/10/2006 09:00 AM Please respond to "Maven Users List" Hello, i sorted out why, it was due to the 'scope' of the dependency. But htis raises another problem: i was not able to find ejb3 jars in maven2 repositories... and if i use the systemPath they will be included in my .ear..... can anyone suggest me a workaround? thanx and regards marco On 3/10/06, Marco Mistroni <[EMAIL PROTECTED]> wrote: > > hello all, > i have a project whichcontains some subprojects.. > i am trying to build an ear out of my project, and when the ear is built > there are additional jar file included > that i don't need... > > i end up with my projects files plus > - geronimo-spec-j2ee-1.4-rc4.jar, > - ejb3-persistence-4.0.3 > - jboss-ejb3x-4.0.3.jar > > > > anyone could help me out? > > my dir structure is: > > main > ------ shared > ------ ejbs > ------ web > ------ ear > > here are the correspondent pom.xml > > ***** main pom.xml ************ > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>root</groupId> > <version> 1.0</version> > <artifactId>project</artifactId> > <packaging>pom</packaging> > <name>project</name> > <modules> > <module>shared</module> > <module>ejbs</module> > <module>web</module> > <module>ear</module> > <module>site</module> > </modules> > <build> > <pluginManagement> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <source>1.5</source> > <target>1.5</target> > </configuration> > </plugin> > <plugin> > <groupId> org.apache.maven.plugins</groupId> > <artifactId>maven-site-plugin</artifactId> > <configuration> > <unzipCommand>/usr/bin/unzip -o > err.txt</unzipCommand> > </configuration> > </plugin> > </plugins> > </pluginManagement> > </build> > > <dependencyManagement> > <dependencies> > <dependency> > <groupId>geronimo-spec</groupId> > <artifactId>geronimo-spec-j2ee</artifactId> > <version>1.4-rc4 </version> > </dependency> > <dependency> > <groupId>fop</groupId> > <artifactId>fop</artifactId> > <version>0.20.5rc2 </version> > </dependency> > <dependency> > <groupId>axis</groupId> > <artifactId>axis-saaj</artifactId> > <version> 1.3</version> > </dependency> > <dependency> > <groupId>axis</groupId> > <artifactId>axis</artifactId> > <version>1.3</version> > </dependency> > > > > <dependency> > <groupId>root</groupId> > <artifactId>shared</artifactId> > <version> 1.0</version> > </dependency> > <dependency> > <groupId>root</groupId> > <artifactId>ejbs</artifactId> > <version>1.0 </version> > </dependency> > <dependency> > <groupId>root</groupId> > <artifactId>web</artifactId> > <version>1.0</version> > </dependency> > > </dependencies> > </dependencyManagement> > <distributionManagement> > <site> > <id>site</id> > <name>project website</name> > <url>scp://local.company.com/websites/project.company.com/</url> > </site> > </distributionManagement> > </project> > *************************************** > shared pom.xml > ************************************** > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>root</groupId> > <artifactId>shared</artifactId> > <packaging>jar</packaging> > <name>core project classes</name> > <parent> > <groupId>root</groupId> > <artifactId>project</artifactId> > <version>1.0</version> > </parent> > > <pluginRepositories> > <pluginRepository> > <id>apache.snapshots</id> > <url>http://cvs.apache.org/maven-snapshot-repository </url> > </pluginRepository> > </pluginRepositories> > <repositories> > <repository> > <id>apache.snapshots</id> > <url> http://cvs.apache.org/maven-snapshot-repository</url> > </repository> > </repositories> > <dependencies> > <dependency> > <groupId>org.testng</groupId> > <artifactId>testng</artifactId> > <version>4.6.1</version> > <scope>test</scope> > <classifier>jdk15</classifier> > </dependency> > </dependencies> > <build> > <plugins> > > <plugin> > <artifactId>maven-compiler-plugin</artifactId> > <configuration> > <encoding>iso-8859-1</encoding> > </configuration> > </plugin> > > </plugins> > </build> > </project> > *************************** > ejbs pom.xml > ************************** > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>root</groupId> > <artifactId>ejbs</artifactId> > <packaging>ejb</packaging> > <version>1.0</version> > <name>enterprise java beans</name> > <parent> > <groupId>root</groupId> > <artifactId>project</artifactId> > <version>1.0</version> > </parent> > <pluginRepositories> > <pluginRepository> > <id>apache.snapshots</id> > <url> http://cvs.apache.org/maven-snapshot-repository</url> > </pluginRepository> > </pluginRepositories> > <repositories> > <repository> > <id>apache.snapshots </id> > <url>http://cvs.apache.org/maven-snapshot-repository</url> > </repository> > </repositories> > <dependencies> > <dependency> > <groupId>root</groupId> > <artifactId>shared</artifactId> > </dependency> > <dependency> > <groupId>geronimo-spec</groupId> > <artifactId>geronimo-spec-j2ee</artifactId> > </dependency> > <dependency> > <groupId>jboss</groupId> > <artifactId>jboss-ejb3x</artifactId> > <version>4.0.3</version> > <scope>system</scope> > <systemPath>${basedir}\lib\jboss-ejb3x-4.0.3.jar</systemPath> > </dependency> > <dependency> > <groupId>jboss</groupId> > <artifactId>ejb3-persistence</artifactId> > <version>4.0.3</version> > <scope>system</scope> > <systemPath>${basedir}\lib\ejb3- persistence-4.0.3.jar</systemPath> > > </dependency> > > > > </dependencies> > <build> > <plugins> > <plugin> > <artifactId>maven-ejb-plugin</artifactId> > <configuration> > <archive> > <manifest> > <addClasspath>true</addClasspath> > </manifest> > </archive> > </configuration> > </plugin> > <plugin> > <artifactId>maven-ejb-plugin</artifactId> > <configuration> > <archive> > <manifest> > <addClasspath>true</addClasspath> > </manifest> > </archive> > </configuration> > </plugin> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-surefire-plugin</artifactId> > <executions> > <execution> > <id>run server side JUnits from tests_Serverside</id> > <phase>integration-test</phase> > <configuration> > <reportFormat>xml</reportFormat> > <includes> > <include>**/*.java </include> > </includes> > <testFailureIgnore>false</testFailureIgnore> > > <testClassesDirectory>target/test-classes</testClassesDirectory> > <classesDirectory>/target/classes</classesDirectory> > </configuration> > <goals> > <goal>test</goal> > </goals> > </execution> > </executions> > </plugin> > > > </plugins> > </build> > </project> > ************************************** > > web pom.xml > ***************************** > <project> > <modelVersion>4.0.0</modelVersion> > <groupId>root</groupId> > <artifactId>web</artifactId> > <packaging>war</packaging> > <name>web</name> > <parent> > <groupId>root</groupId> > <artifactId>project</artifactId> > <version>1.0</version> > </parent> > <dependencies> > <dependency> > <groupId>root</groupId> > <artifactId>shared</artifactId> > <scope>provided</scope> > </dependency> > <dependency> > <groupId>root</groupId> > <artifactId>ejbs</artifactId> > <scope>provided</scope> > </dependency> > <dependency> > <groupId>jaxm</groupId> > <artifactId>jaxm-api</artifactId> > <version>1.1.2</version> > <scope>system</scope> > <systemPath>${basedir}\lib\jaxm-api-1.1.2.jar</systemPath> > </dependency> > > <dependency> > <groupId>jaxm</groupId> > <artifactId>jaxm-runtime</artifactId> > <version>1.1.2</version> > <scope>system</scope> > <systemPath>${basedir}\lib\jaxm-runtime-1.1.2.jar</systemPath> > </dependency> > > > > > </dependencies> > </project> > ******************************* > ear pom.xml > ******************************** > <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>root</groupId> > <artifactId>project</artifactId> > <version>1.0</version> > </parent> > <modelVersion>4.0.0</modelVersion> > <artifactId>ejb3-deploy</artifactId> > <packaging>ear</packaging> > <build> > <plugins> > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-ear-plugin</artifactId> > <configuration> > <modules> > <ejbModule> > <groupId>root</groupId> > <artifactId>ejbs</artifactId> > <bundleFileName> > ejb3-app-1.0-SNAPSHOT.par > </bundleFileName> > </ejbModule> > <webModule> > <groupId>root</groupId> > <artifactId>web</artifactId> > <bundleFileName> > ejb3-web.war > </bundleFileName> > </webModule> > <javaModule> > <groupId>root</groupId> > <artifactId>shared</artifactId> > <bundleFileName>sharedlib.jar > </bundleFileName> > </javaModule> > > </modules> > </configuration> > </plugin> > </plugins> > </build> > > <dependencies> > <dependency> > <groupId>root</groupId> > <artifactId>ejbs</artifactId> > <version>1.0</version> > <type>ejb</type> > </dependency> > <dependency> > <groupId>root</groupId> > <artifactId>shared</artifactId> > <version>1.0</version> > <type>jar</type> > </dependency> > <dependency> > <groupId>root</groupId> > <artifactId>web</artifactId> > <version>1.0</version> > <type>war</type> > </dependency> > </dependencies> > </project> > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
