Use maven-war-plugin. Due to transitive dependencies in M2, you need to
remove them using the <warSourceExcludes> tag in the plugin as below.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0.1</version>
<configuration>
<warSourceExcludes>
WEB-INF/lib/jar1,WEB-INF/lib/jar2,
</warSourceExcludes>
</configuration>
</plugin>
</plugins>
</build>
Checkout : http://maven.apache.org/plugins/maven-war-plugin/index.html
jiangshachina wrote:
>
> I have another question.
> In Web application project, generally, class files would be located at
> WEB-INF/classes.
> But now, I want they to be archived, and locate at WEB-INF/lib.
>
> And I want the jars could be put into different sub-directory under
> WEB-INF/lib?
>
> maven-jar-plugin or maven-war-plugin can help me?
> How can I do?
>
>
> jiangshachina wrote:
>>
>> Hello,
>> My web projects needs Apache commons-configuration.
>> I added commons-configuration to my dependency.
>> After run "mvn package", too many jar files were added into WEB-INF/lib
>> directory.
>> But I found many jars(e.g. xalan-2.7.0.jar) out of the list, which lists
>> commons-configuration's runtime dependencies, shown at home of
>> commons-collections.
>> In commons-configuration-1.2.pom, so many dependencies are added.
>>
>> How to cancel the trouble?
>>
>> a cup of Java, cheers!
>> Sha Jiang
>>
>
>
--
View this message in context:
http://www.nabble.com/Too-many-jars-added-to-lib--tf2558368s177.html#a7129610
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]