尽管我在<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
中有pom.xml
标记,但是我的构建无法排除那些软件包或jar。
第八,在.mf(Manifest file)
中创建类路径
<profiles>
<profile>
<id>dev</id>
</profile>
<profile>
<id>deploy</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<useUniqueVersions>false</useUniqueVersions>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>