<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>
我有文件 src/main/webapp/META-INF/context.xml
我想将它从战争文件中排除。我参考了官方文档并在 pom.xml 中添加了插件。但它出现在 demo.war/META-INF/context.xml 下