这是我的pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.JackboyPlay.BCC</groupId>
<artifactId>BungeeCordCore</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<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>
<artifactSet>
<includes>
<include>org.spigotmc:bungeecord</include> <!-- Set "org.spigotmc" to the bungeecord groupId -->
</includes>
</artifactSet>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/</directory>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
</resources>
</build>
</artifactSet>
在月食中用红色下划线标出。我试图删除此行,但另一行用红色下划线标记。如果有人知道如何解决该错误,请随时回答:)
最佳答案
问题是artifactSet
应该在configuration
标记内设置。
尝试这个:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>me.JackboyPlay.BCC</groupId>
<artifactId>BungeeCordCore</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<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.spigotmc:bungeecord
</include> <!-- Set "org.spigotmc" to the bungeecord groupId -->
</includes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/</directory>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
</resources>
</build> </project>