maven-semembly-plugin d dy dy not of target/class farget/class伪像在生成的jarfat中,但meta-inf/sustest.mf似乎是正确的
Maven-Asembly-Plugin在生成的FATJAR中没有添加目标/类工件,但是Meta-Inf/subest.mf似乎是正确的。我正在使用3.4.0
插件版本。
请参阅下面从pom.xml提取的相关构建段:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>my_package.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
下面的此命令并未显示
jar -tvf target/my-fat-jar.jar | grep Main.class
我的主要类别和其他项目工件的任何内容,并未通过maven-sepembly-plugin
编辑:< /strong>我用其他版本的插件(3.2.0,2.2,...
)对其进行了测试,并且它不起作用。但是,如果我将版本从3.4.0
更改为2.2-beta-5
fatjar的生成正确。版本2.2-Beta-5
来自2009年12月6日,即非常旧。我想使用较新的版本。有什么想法吗?
The maven-assembly-plugin doesn't add target/class artifacts in generated fatjar but META-INF/MANIFEST.MF seems to be correct. I'm using the 3.4.0
plugin version.
See below the relevant build segment extracted from pom.xml:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.4.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>my_package.Main</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
this command below does not show anything
jar -tvf target/my-fat-jar.jar | grep Main.class
My main class and other project artifacts are not added in fatjar by maven-assembly-plugin
Edit: I tested it with other versions of the plugin (3.2.0, 2.2, ...
) and it didn't work. However if I change the version from 3.4.0
to 2.2-beta-5
the fatjar is generated correctly. Version 2.2-beta-5
is from 12/06/2009, ie very old. I would like to use a newer version. Any idea ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论