我尝试使用自定义清单文件以及清单条目来对罐子进行着色。在这两种情况下,它甚至都不接受任何清单文件。
我已经查看了有关Shade插件的Apache Maven文档,但该文档无法正常工作。
这是我的阴影配置:
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>kafkapub.main.app.MainApp</mainClass>
<manifestEntries>
<Class-Path>.</Class-Path>
</manifestEntries>
</transformer>
</transformers>
<shadedArtifactAttached>true</shadedArtifactAttached>
<shadedClassifierName>launcher</shadedClassifierName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
有人见过类似的问题吗?
答案 0 :(得分:0)
我想我已经解决了这个问题。
基本上,它创建了-shaded
工件。既然有三个罐子:
original-*.jar
*.jar
*-shaded.jar
那真是令人困惑。但是,现在我可以在Shaded jar中看到所有内容了。