我无法将所需的库包装到我的Jar中,阴影插件不会在控制台中提供任何类型的输出,使得它很难描述这里发生的事情,因为它更缺乏。
<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>
<artifactSet>
<includes>
<include>org.javacord:javacord</include>
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
我认为不应该这样做吗?
这是我试图打包的lib:
<dependency>
<groupId>org.javacord</groupId>
<artifactId>javacord</artifactId>
<version>3.0.4</version>
<type>pom</type>
<scope>provided</scope>
</dependency>
控制台输出粘贴在这里:https://hastebin.com/soxafiqupe.cs
首先检查,如in here,你的插件定义是在你的pom中,而不是你的父pom(如果你有的话)
然后确保(如在this answer中)plugin
部分在build
部分内,而不是build/pluginManagement
部分。
如果你想要更多的痕迹,mvn -X clean install
会更加冗长。