【发布时间】:2023-03-30 08:44:01
【问题描述】:
我正在尝试遮蔽aws-java-sdk,以根据here 提到的建议解决库冲突。但是我看到maven-shade-plugin,资源文件(文本)中的条目没有得到更新。例如,request.handler2s 和 request.handlers 的内容不会按照重定位模式进行更改。
maven-shade-plugin 可以更新这些文件(资源文件)吗?如果没有,还有什么其他选择?
pom.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.4.3</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>com.amazonaws</pattern>
<shadedPattern>com.XX.YY.shaded.com.amazonaws</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
【问题讨论】:
标签: maven amazon-web-services apache-flink maven-shade-plugin aws-java-sdk