Java 在maven中对jar文件进行着色后,如何删除它
我有一个包a->Java 在maven中对jar文件进行着色后,如何删除它,java,maven,jar,package,Java,Maven,Jar,Package,我有一个包a->io.netty。maven将io netty着色到A的jar文件后,使用以下配置: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <executions> <execution> <phase
io.netty
。maven将io netty着色到A的jar文件后,使用以下配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<artifactSet>
<includes>
<include>io.netty:netty-all:jar:*</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>io.netty</pattern>
<shadedPattern>com.a.io.netty</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
org.apache.maven.plugins
maven阴影插件
包裹
阴凉处
真的
io.netty:netty all:jar:*
伊奥·内蒂
com.a.io.netty
A.jar和netty.jar都位于target
目录中。在运行mvn包
时,有没有办法删除netty all-*.Final.jar
谢谢 这可能不是您想要的答案,但是在maven构建的不同阶段执行各种内务管理工作的一种快速方法是运行ant任务。看看
maven-antrun-plugin
,如果你找不到一个能完全满足你需要的插件,在这种情况下,只需调用mvn-clean
就可以更简单地使用maven本身。你找到解决方案了吗?