Use the scope tag to decide which jars to be packaged. Scope can be etiher test/compile/runtime/provided. Niraj
-----Original Message----- From: nitinaggarwal [mailto:[EMAIL PROTECTED] Sent: Thursday, June 21, 2007 5:22 PM To: users@maven.apache.org Subject: Issue in excluding unwanted jars from the target war. Hi I am pretty new to maven 2. i am working on a portal (jsr 168 portlets) project on jetspeed 2.1 portal server and building using maven2.05. when i use the mvn install command the build is fine and i am successfully able to generate a fcapps.war file. Everything seems working fine but the problem occurs when i try to deploy this war on jetspeed 2.1 The fcapps.war file contains all the jars which i do not intend to use. when i try to run the application it gives me an error that application fcapps not available and only when i delete the unnecessary jars i am able to run the application properly this seems pretty wierd can any one help. i only need these 7 jars to deploy my application commons-logging-1.0.3.jar ehcache-1.2.4.jar fcCaching-1.0.jar fcCmStub-1.0.jar fcpf-1.0.jar jdom-1.0.jar log4j-1.2.8.jar i am attaching the pom.xml file for my project. <!-- author Nitin Aggarwal Project Object model for fidelity central application--> <project> <modelVersion>4.0.0</modelVersion> <parent> <groupId>FidelityCentral</groupId> <artifactId>application</artifactId> <version>1.0</version> </parent> <artifactId>fcapps</artifactId> <packaging>war</packaging> <name>Fidelity Central</name> <description>Fidelity Central Portlets</description> <version>1.0</version> <build> <sourceDirectory>src/java</sourceDirectory> <defaultGoal>install</defaultGoal> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <warSourceDirectory>src/webapp</warSourceDirectory> </configuration> </plugin> </plugins> </pluginManagement> <resources> <resource> <directory>target/fc</directory> <includes> <include>fc.war</include> </includes> <excludes> <exclude>**.*</exclude> </excludes> </resource> </resources> </build> <dependencies> <dependency> <groupId>org.apache.portals.bridges</groupId> <artifactId>portals-bridges-common</artifactId> <version>1.0.1-dev</version> <scope>provided</scope> </dependency> <dependency> <groupId>jdom</groupId> <artifactId>jdom</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>FidelityCentral</groupId> <artifactId>fcCmStub</artifactId> <version>1.0</version> </dependency> <!-- <dependency> <groupId>FidelityCentral</groupId> <artifactId>fc-auth</artifactId> <version>1.0</version> </dependency>--> <dependency> <groupId>FidelityCentral</groupId> <artifactId>fcCaching</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>FidelityCentral</groupId> <artifactId>fcpf</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.3</version> <scope>provided</scope> </dependency> <dependency> <groupId>portlet-api</groupId> <artifactId>portlet-api</artifactId> <version>1.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.pluto</groupId> <artifactId>pluto</artifactId> <version>1.0.1</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.portals.jetspeed-2</groupId> <artifactId>jetspeed-api</artifactId> <version>2.1-dev</version> <scope>provided</scope> </dependency> </dependencies> </project> http://www.nabble.com/file/p11231529/pom.xml pom.xml -- View this message in context: http://www.nabble.com/Issue-in-excluding-unwanted-jars-from-the-target-w ar.-tf3958240s177.html#a11231529 Sent from the Maven - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]