1
hereの推奨に従って、ライブラリの競合を解決するために、私は陰影aws-java-sdkを試しています。しかし、maven-shade-pluginが表示され、リソースファイル(テキスト)のエントリが更新されていないことがわかります。例えば、request.handler2sとrequest.handlersの内容は、再配置パターンに従って変更されません。リソースファイル内のエントリを更新しないMaven shade-pluginの再配置
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>
は、私は、これを試してみました私のために動作しませんでした、ありがとうございます! – anumodh
shade-pluginのバージョンを3.0.0にアップデートしてください。以前のバージョンではサービスの再配置に関する問題がありました。 –
org.apache.maven.plugins.shade.resource.ServicesResourceTransformerは、META-INF/servicesの下でファイルを再配置します。 AWS resource.handlerファイルは異なるパスにあります(com/amazonaws/services/sqs/resource.handler)。移転中に誰かがこのファイルを変更するソリューションを持っていますか?同じ問題に直面している。ありがとう。 – popcoder