我试图排除.jar
个文件被复制到输出目录。我已尝试过给出的解决方案,即<excludes>*.jar</excludes>
和<warSourceExcludes>*.jar</warSourceExcludes>
,但它们都没有工作。
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>install-artifacts</id>
<phase>install</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.abc.xyz</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
<overWrite>true</overWrite>
<outputDirectory>../../ReleaseArtifacts</outputDirectory>
</artifactItem>
</artifactItems>
<stripVersion>true</stripVersion>
</configuration>
</execution>
<execution>
<id>install-artifacts-2</id>
<phase>install</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.abc.xyz</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
<overWrite>true</overWrite>
<outputDirectory>../../../ReleaseArtifacts/${project.version}</outputDirectory>
<excludes>*.jar</excludes>
</artifactItem>
</artifactItems>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>