<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.mycompany.MainClass</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>org.apache.hadoop:*</artifact>
<excludes>
<exclude>*.xml</exclude>
</excludes>
</filter>
</filters>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>standalone</shadedClassifierName>
</configuration>
</execution>
</executions>
</plugin>
用shade 打包,过滤掉一些不想打进big jar内的文件,布布扣,bubuko.com
时间: 2024-12-07 15:35:58