Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/398.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven编译失败-java.lang.ClassNotFoundException_Java_Maven_Bungeecord - Fatal编程技术网

Maven编译失败-java.lang.ClassNotFoundException

Maven编译失败-java.lang.ClassNotFoundException,java,maven,bungeecord,Java,Maven,Bungeecord,我有一个问题,我想定制我的蹦极为我的服务器,但当我建立项目有一个大问题 maven日志: 我的主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

我有一个问题,我想定制我的蹦极为我的服务器,但当我建立项目有一个大问题

maven日志:

我的主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>

4.0.0
net.md-5
橡皮筋亲本
1.12-1
聚甲醛
橡皮筋亲本
所有橡皮筋模块的父项目。
https://github.com/SpigotMC/BungeeCord
2012
龙头
https://github.com/SpigotMC
BSD 3条款许可证
http://opensource.org/licenses/BSD-3-Clause
回购
md_5
应用程序编程接口
独自创立
聊天
配置
事件
日志
模块
协议
代理
查询
本地的
scm:git:git@github.com:SpigotMC/BungeeCord.git
scm:git:git@github.com:SpigotMC/BungeeCord.git
git@github.com:SpigotMC/BungeeCord.git
github
https://github.com/SpigotMC/BungeeCord/issues
詹金斯
http://ci.md-5.net/job/BungeeCord
sonatype nexus快照
https://oss.sonatype.org/content/repositories/snapshots/
未知的
4.1.21.最终版本
1.7
1.7
UTF-8
朱尼特
朱尼特
4.12
测试
番石榴
番石榴
20
编译
com.google.code.findbugs
findbugs注释
3.0.1
假如
org.projectlombok
龙目
1.16.16
假如
net.md-5
脚本
0.3.1
git:${project.name}:${project.version}:%s:${build.number}
初始化
描述
org.codehaus.mojo
动物嗅探器maven插件
1.16
进程类
检查
org.codehaus.mojo.signature
爪哇17
1
org.eclipse.m2e
生命周期映射
1.0.0
net.md-5
脚本
[0.3.1,)
描述
假的
这是模块BungeeCond 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>

4.0.0
net.md-5
橡皮筋亲本
1.12-1
../pom.xml
net.md-5
橡皮筋引导
1.12-1
罐子
橡皮筋引导
用于蹦极绳的Java 1.6加载程序
真的
1.6
1.6
yyyyMMdd
net.md-5
橡皮筋代理
${project.version}
编译
net.sf.jopt-simple
简单的
4.9
编译
蹦极绳
org.apache.maven.plugins
maven jar插件
3.0.2
net.md_5.bungee.Bootstrap
${descripe}
${maven.build.timestamp}
org.apache.maven.plugins
maven阴影插件
3.0.0
包裹
阴凉处
*:*
**/*.爪哇
**/*.SF
**/*.DSA

我尝试了所有方法,但没有任何效果,但是在依赖项中工作的类很好,我不理解…

删除您的本地.m2存储库。运行“mvn clean install”。如果问题仍然存在,请告诉我们。它已经工作了!谢谢