3
库我使用maven战争插件来排除一些常见的罐子,把他们在classpath中。我能够正确生成war文件,排除指定的库并将它们添加到类路径中,但爆炸的war目录仍包含排除的库文件。如何生成使用maven war插件配置的爆炸战争文件。的Maven插件战争不能排除爆炸战争格式
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ekaplus.ctrm.mdm</groupId>
<artifactId>core-presentation</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<name>presentation layer core</name>
<dependencies>
<dependency>
<groupId>com.ekaplus.ctrm.mdm</groupId>
<artifactId>eka-core-mdm-presentation</artifactId>
<version>1.0</version>
<scope>compile</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>exploded</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<defaultGoal>package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1</version>
<configuration>
<packagingExcludes>
WEB-INF/lib/dto-common-1.0.jar,
WEB-INF/lib/eka-action-1.0.jar
</packagingExcludes>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
感谢您的回复!我们只想制造瘦骨w w的战争。其实我们有多次战争(其中6次)。它们被封装在耳朵文件中。由于核心库和其他依赖库,war文件的大小增加。我也尝试提供范围。它工作正常,但我需要添加与类路径(每个战争的META-INF)中提供的依赖范围的库。可以做些什么将它们添加到classpath中? – 2010-10-31 06:18:58