Maven编译失败 - java.lang.ClassNotFoundException

时间:2018-02-14 07:42:32

标签: java maven bungeecord

我有一个问题,我想为我的服务器定制我的BungeeCord但是当我构建项目有一个大问题。

maven日志:https://pastebin.com/raw/Y2ppUL3d

我的主要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>net.md-5</groupId>
    <artifactId>bungeecord-parent</artifactId>
    <version>1.12-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>BungeeCord-Parent</name>
    <description>Parent project for all BungeeCord modules.</description>
    <url>https://github.com/SpigotMC/BungeeCord</url>
    <inceptionYear>2012</inceptionYear>
    <organization>
        <name>SpigotMC</name>
        <url>https://github.com/SpigotMC</url>
    </organization>
    <licenses>
        <license>
            <name>The BSD 3-Clause License</name>
            <url>http://opensource.org/licenses/BSD-3-Clause</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>md_5</id>
        </developer>
    </developers>

    <modules>
        <module>api</module>
        <module>bootstrap</module>
        <module>chat</module>
        <module>config</module>
        <module>event</module>
        <module>log</module>
        <module>module</module>
        <module>protocol</module>
        <module>proxy</module>
        <module>query</module>
        <module>native</module>
    </modules>

    <scm>
        <connection>scm:git:git@github.com:SpigotMC/BungeeCord.git</connection>
        <developerConnection>scm:git:git@github.com:SpigotMC/BungeeCord.git</developerConnection>
        <url>git@github.com:SpigotMC/BungeeCord.git</url>
    </scm>
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/SpigotMC/BungeeCord/issues</url>
    </issueManagement>
    <ciManagement>
        <system>jenkins</system>
        <url>http://ci.md-5.net/job/BungeeCord</url>
    </ciManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>sonatype-nexus-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <build.number>unknown</build.number>
        <netty.version>4.1.21.Final</netty.version>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>20.0</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>findbugs-annotations</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.16.16</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>net.md-5</groupId>
                <artifactId>scriptus</artifactId>
                <version>0.3.1</version>
                <configuration>
                    <format>git:${project.name}:${project.version}:%s:${build.number}</format>
                </configuration>
                <executions>
                    <execution>
                        <phase>initialize</phase>
                        <goals>
                            <goal>describe</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>animal-sniffer-maven-plugin</artifactId>
                <version>1.16</version>
                <executions>
                    <execution>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <signature>
                        <groupId>org.codehaus.mojo.signature</groupId>
                        <artifactId>java17</artifactId>
                        <version>1.0</version>
                    </signature>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>net.md-5</groupId>
                                        <artifactId>scriptus</artifactId>
                                        <versionRange>[0.3.1,)</versionRange>
                                        <goals>
                                            <goal>describe</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <execute>
                                            <runOnIncremental>false</runOnIncremental>
                                        </execute>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>

这是模块bungeecord-boostrap的pom

<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>

    <parent>
        <groupId>net.md-5</groupId>
        <artifactId>bungeecord-parent</artifactId>
        <version>1.12-SNAPSHOT</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>net.md-5</groupId>
    <artifactId>bungeecord-bootstrap</artifactId>
    <version>1.12-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>BungeeCord-Bootstrap</name>
    <description>Java 1.6 loader for BungeeCord</description>

    <properties>
        <maven.deploy.skip>true</maven.deploy.skip>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
        <maven.build.timestamp.format>yyyyMMdd</maven.build.timestamp.format>
    </properties>

    <dependencies>
        <dependency>
            <groupId>net.md-5</groupId>
            <artifactId>bungeecord-proxy</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>net.sf.jopt-simple</groupId>
            <artifactId>jopt-simple</artifactId>
            <version>4.9</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>BungeeCord</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Main-Class>net.md_5.bungee.Bootstrap</Main-Class> 
                            <Implementation-Version>${describe}</Implementation-Version>
                            <Specification-Version>${maven.build.timestamp}</Specification-Version>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>**/*.java</exclude>
                                <exclude>**/*.SF</exclude>
                                <exclude>**/*.DSA</exclude>
                            </excludes>
                        </filter>
                    </filters>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

我尝试了所有的东西,但没有任何作用,但是有效的类在依赖项中很好,我不明白......

0 个答案:

没有答案