【maven】jetty:run失败,实在不清楚怎么解决了 头疼。。。

pom文件配置片段

 <build>
    <finalName>front</finalName>
    <plugins>
        <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.3.24.v20180605</version>
                <configuration>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <stopPort>9999</stopPort>
                    <webAppConfig>
                        <contextPath>/front</contextPath>
                    </webAppConfig>
                    <httpConnector>
                            <port>9080</port>
                            <idleTimeout>30000</idleTimeout>
                    </httpConnector>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <!--注意增加这两行,在打包时相关的类会被独立打成jar -->
                    <attachClasses>true</attachClasses>
                    <classesClassifier>api</classesClassifier>
                </configuration>
                <version>2.4</version>
                <executions>
                </executions>
            </plugin>
    </plugins>
  </build>

部分日志

…………

[INFO] Scanning elapsed time=2830ms
[INFO] No Spring WebApplicationInitializer types detected on classpath
[INFO] Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
[INFO] Started ServerConnector@1735e1c4{HTTP/1.1,[http/1.1]}{0.0.0.0:9080}
[INFO] Jetty server exiting.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 42.755 s
[INFO] Finished at: 2019-10-23T21:39:16+08:00
[INFO] Final Memory: 57M/620M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.eclipse.jetty:jetty-maven-plugin:9.3.24.v20180605:run (default-cli) on project front: Execution default-cli of goal org.eclipse.jetty:jetty-maven-plugin:9.3.24.v20180605:run failed: An API incompatibility was encountered while executing org.eclipse.jetty:jetty-maven-plugin:9.3.24.v20180605:run: java.lang.AbstractMethodError: null
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.eclipse.jetty:jetty-maven-plugin:9.3.24.v20180605
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-maven-plugin/9.3.24.v20180605/jetty-maven-plugin-9.3.24.v20180605.jar
[ERROR] urls[1] = file:/C:/Users/zlzhangn/.m2/repository/org/sonatype/sisu/sisu-inject-bean/2.1.1/sisu-inject-bean-2.1.1.jar
[ERROR] urls[2] = file:/C:/Users/zlzhangn/.m2/repository/org/sonatype/sisu/sisu-guice/2.9.4/sisu-guice-2.9.4-no_aop.jar
[ERROR] urls[3] = file:/C:/Users/zlzhangn/.m2/repository/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar
[ERROR] urls[4] = file:/C:/Users/zlzhangn/.m2/repository/org/sonatype/aether/aether-util/1.11/aether-util-1.11.jar
[ERROR] urls[5] = file:/C:/Users/zlzhangn/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[6] = file:/C:/Users/zlzhangn/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[7] = file:/C:/Users/zlzhangn/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[8] = file:/C:/Users/zlzhangn/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[9] = file:/C:/Users/zlzhangn/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-tools-api/3.5/maven-plugin-tools-api-3.5.jar
[ERROR] urls[10] = file:/C:/Users/zlzhangn/.m2/repository/backport-util-concurrent/backport-util-concurrent/3.1/backport-util-concurrent-3.1.jar
[ERROR] urls[11] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-util/9.3.24.v20180605/jetty-util-9.3.24.v20180605.jar
[ERROR] urls[12] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-webapp/9.3.24.v20180605/jetty-webapp-9.3.24.v20180605.jar
[ERROR] urls[13] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-xml/9.3.24.v20180605/jetty-xml-9.3.24.v20180605.jar
[ERROR] urls[14] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-servlet/9.3.24.v20180605/jetty-servlet-9.3.24.v20180605.jar
[ERROR] urls[15] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-quickstart/9.3.24.v20180605/jetty-quickstart-9.3.24.v20180605.jar
[ERROR] urls[16] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-jaas/9.3.24.v20180605/jetty-jaas-9.3.24.v20180605.jar
[ERROR] urls[17] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-security/9.3.24.v20180605/jetty-security-9.3.24.v20180605.jar
[ERROR] urls[18] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-plus/9.3.24.v20180605/jetty-plus-9.3.24.v20180605.jar
[ERROR] urls[19] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-jndi/9.3.24.v20180605/jetty-jndi-9.3.24.v20180605.jar
[ERROR] urls[20] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-server/9.3.24.v20180605/jetty-server-9.3.24.v20180605.jar
[ERROR] urls[21] = file:/C:/Users/zlzhangn/.m2/repository/javax/servlet/javax.servlet-api/3.1.0/javax.servlet-api-3.1.0.jar
[ERROR] urls[22] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-http/9.3.24.v20180605/jetty-http-9.3.24.v20180605.jar
[ERROR] urls[23] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-io/9.3.24.v20180605/jetty-io-9.3.24.v20180605.jar
[ERROR] urls[24] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-jmx/9.3.24.v20180605/jetty-jmx-9.3.24.v20180605.jar
[ERROR] urls[25] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/jetty-annotations/9.3.24.v20180605/jetty-annotations-9.3.24.v20180605.jar
[ERROR] urls[26] = file:/C:/Users/zlzhangn/.m2/repository/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar
[ERROR] urls[27] = file:/C:/Users/zlzhangn/.m2/repository/org/ow2/asm/asm/6.0/asm-6.0.jar
[ERROR] urls[28] = file:/C:/Users/zlzhangn/.m2/repository/org/ow2/asm/asm-commons/6.0/asm-commons-6.0.jar
[ERROR] urls[29] = file:/C:/Users/zlzhangn/.m2/repository/org/ow2/asm/asm-tree/6.0/asm-tree-6.0.jar
[ERROR] urls[30] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-server-impl/9.3.24.v20180605/javax-websocket-server-impl-9.3.24.v20180605.jar
[ERROR] urls[31] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/websocket/javax-websocket-client-impl/9.3.24.v20180605/javax-websocket-client-impl-9.3.24.v20180605.jar
[ERROR] urls[32] = file:/C:/Users/zlzhangn/.m2/repository/javax/websocket/javax.websocket-api/1.0/javax.websocket-api-1.0.jar
[ERROR] urls[33] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/websocket/websocket-server/9.3.24.v20180605/websocket-server-9.3.24.v20180605.jar
[ERROR] urls[34] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/websocket/websocket-common/9.3.24.v20180605/websocket-common-9.3.24.v20180605.jar
[ERROR] urls[35] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/websocket/websocket-api/9.3.24.v20180605/websocket-api-9.3.24.v20180605.jar
[ERROR] urls[36] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/websocket/websocket-client/9.3.24.v20180605/websocket-client-9.3.24.v20180605.jar
[ERROR] urls[37] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/websocket/websocket-servlet/9.3.24.v20180605/websocket-servlet-9.3.24.v20180605.jar
[ERROR] urls[38] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/apache-jsp/9.3.24.v20180605/apache-jsp-9.3.24.v20180605.jar
[ERROR] urls[39] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/toolchain/jetty-schemas/3.1/jetty-schemas-3.1.jar
[ERROR] urls[40] = file:/C:/Users/zlzhangn/.m2/repository/org/mortbay/jasper/apache-jsp/8.0.33/apache-jsp-8.0.33.jar
[ERROR] urls[41] = file:/C:/Users/zlzhangn/.m2/repository/org/mortbay/jasper/apache-el/8.0.33/apache-el-8.0.33.jar
[ERROR] urls[42] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar
[ERROR] urls[43] = file:/C:/Users/zlzhangn/.m2/repository/org/eclipse/jetty/apache-jstl/9.3.24.v20180605/apache-jstl-9.3.24.v20180605.jar
[ERROR] urls[44] = file:/C:/Users/zlzhangn/.m2/repository/org/apache/taglibs/taglibs-standard-spec/1.2.5/taglibs-standard-spec-1.2.5.jar
[ERROR] urls[45] = file:/C:/Users/zlzhangn/.m2/repository/org/apache/taglibs/taglibs-standard-impl/1.2.5/taglibs-standard-impl-1.2.5.jar
[ERROR] urls[46] = file:/C:/Users/zlzhangn/.m2/repository/javax/transaction/javax.transaction-api/1.2/javax.transaction-api-1.2.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
Exception in thread "Thread-1" java.lang.BootstrapMethodError: java.lang.NoClassDefFoundError: org/eclipse/jetty/http/pathmap/MappedResource
    at org.eclipse.jetty.websocket.server.NativeWebSocketConfiguration.doStop(NativeWebSocketConfiguration.java:65)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.stop(ContainerLifeCycle.java:142)
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStop(ContainerLifeCycle.java:160)
    at org.eclipse.jetty.websocket.jsr356.ClientContainer.doStop(ClientContainer.java:205)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.stop(AbstractLifeCycle.java:89)
    at org.eclipse.jetty.util.thread.ShutdownThread.run(ShutdownThread.java:138)
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/http/pathmap/MappedResource
    ... 7 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.http.pathmap.MappedResource
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:271)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:247)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:239)
    ... 7 more

我看这个类在本地仓库里是存在的, 试了很多办法还是提示这个 不知道该怎么办了

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问