1
here의 권장 사항에 따라 라이브러리 충돌을 해결하기 위해 음영을 시도하고 있습니다 (aws-java-sdk). 하지만 maven-shade-plugin, 리소스 파일 (텍스트) 항목이 업데이트되지 않습니다. 예를 들어 request.handler2s 및 request.handlers의 내용은 재배치 패턴에 따라 변경되지 않습니다.Maven 음영 - 플러그인 재배치가 리소스 파일의 항목을 업데이트하지 않습니다.
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