<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>src/main/webapp</directory>
<!-- there's no default value for this -->
<excludes>
<exclude>META-INF/context.xml</exclude>
</excludes>
</resource>
</webResources>
</configuration>
</plugin>
我有File src / main / webapp / META-INF / context.xml
我想将它从war文件中排除 . 我参考官方文档并将插件添加到pom . 但它出现在demo.war / META-INF / context.xml下
1 回答
这很有效