我有以下战争项目:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
...
<properties>
<failOnMissingWebXml>false</failOnMissingWebXml>
</properties>
<dependencies>
...
<dependency>
<groupId>com.sixgroup.rdx.common</groupId>
<artifactId>rdx-common-web</artifactId>
<type>war</type>
</dependency>
<dependency>
<groupId>com.sixgroup.rdx.common</groupId>
<artifactId>rdx-common-web</artifactId>
<version>${rdx-common.version}</version>
<type>jar</type>
<classifier>classes</classifier>
</dependency>
...
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<!-- <version>3.3</version> -->
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<overlays>
<overlay>
<groupId>com.sixgroup.rdx.common</groupId>
<artifactId>rdx-common-web</artifactId>
<exludes>
<exclude>WEB-INF/lib/*.jar</exclude>
<exclude>WEB-INF/classes/**/*.class</exclude>
</exludes>
</overlay>
</overlays>
</configuration>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
这会与根目录中的common-web .xhtml文件以及web-inf / lib文件夹中的common-web as jar类产生一场美妙的战争。
但是现在当我建立耳朵时,这场战争的重叠被忽略了,所以排除了不能正常工作,因此我在部署时遇到错误(A component named 'FooBar' is already defined in this module
)
这是我耳中的webModule:
<webModule>
<groupId>${project.groupId}</groupId>
<artifactId>rdp-pricedata-web</artifactId>
<bundleFileName>rdp-pricedata-web.war</bundleFileName>
<unpack>true</unpack>
</webModule>
有没有办法迫使耳朵接受战争中的叠加?