1
我的目标是将两个Maven模块(packaging:jar
)的src/main/resources
中的两个XML文件(都命名为info.xml
)合并到目标WAR档案中。Maven shade插件不合并文件
proj1:包含src/main/resources/info.xml
proj2:包含src/main/resources/info.xml
网络:网络项目,该项目应包含proj1和proj2合并info.xml。我宣布在Web项目中的插件:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
<resource>info.xml</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
来构建Web项目及其模块我有一个建设项目有:
<modules>
<module>proj1</module>
<module>proj2</module>
<module>web</module>
<modules>
我在构建项目和使用mvn clean package
命令尝试结果我的web/target/web.war
包含解压后的库(ueber.jar,我真的不想)和没有合并的info.xml文件。
我在做什么错?