我想知道我是否可以从jar-with-dependencies程序集中排除JAR文件(即相应的包/类层次结构)?
我知道这可以通过创建自定义程序集描述符来完成,但这可以直接在POM uwint中完成预定义的descriptorRefs吗?
到目前为止,我测试的方法如下:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<dependencySets>
<dependencySet>
<excludes>
<exclude>com.somepackage:*</exclude>
</excludes>
</dependencySet>
</dependencySets>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<finalName>${project.artifactId}-${project.version}</finalName>
<classifier>full-build</classifier>
</configuration>
<executions>
<execution>
<id>jar-with-depts</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
但没有成功......
提前致谢!