Thanks Hilco for the reply.
We are using war plugin also;
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>conf/web.xml</webXml>
<webappDirectory>target/work/outbound</webappDirectory>
</configuration>
</plugin>
But it does not copy all the required jars into war so additionally we are
using below dependency.
Thanks,
Amol
-----Original Message-----
From: Hilco Wijbenga [mailto:[email protected]]
Sent: Monday, February 28, 2011 10:39 PM
To: Maven Users List
Cc: Fuke, Amol
Subject: Re: Unwanted jars getting copied
On 28 February 2011 06:53, Fuke, Amol <[email protected]> wrote:
> I am using below snippet to copy dependant jars from lib to war. But this
> also copying some unwanted jars like rt.jar and tools.jar.
>
> Is there any way I exclude them from getting copied into my war.
>
> <plugin>
> <artifactId>maven-dependency-plugin</artifactId>
> <executions>
> <execution>
> <phase>install</phase>
> <goals>
> <goal>copy-dependencies</goal>
> </goals>
> <configuration>
> <outputDirectory>${project.build.directory}/lib</outputDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
Why don't you simply use the Maven WAR Plugin?