如何解决Maven Shade插件-Jar和依赖项
我正在使用shade插件为org.apache.poi jar着色,因为Tomcat服务器上有一个旧版本。我有一个问题,因为此jar引用了其他jar(commons-compress,xmlbeans,commons-collections)。我该如何不仅遮盖这个罐子,而且遮盖它的引用罐子?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedClassifierName>shaded</shadedClassifierName>
<shadedArtifactAttached>true</shadedArtifactAttached>
<relocations>
<relocation>
<pattern>org.apache.poi</pattern>
<shadedPattern>hidden.org.apache</shadedPattern>
</relocation>
</relocations>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/maven/**/*</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
我试图重新放置所有的罐子,但这是不可能的。
解决方法
我将所有逻辑放在一个外部微服务上,并从 Pentaho 内部调用。我不知道这是否是最好的解决方案,但我找不到另一个。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。