`
houlinyan
  • 浏览: 149162 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

mvn Caused by: java.lang.NoClassDefFoundError: org/sonatype/aether/version/Versi

阅读更多

mvn dependency:tree 报了这么个错:

 

写道
import: Entry[import from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:168)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing org.apache.maven.plugins:maven-dependency-plugin:2.6:tree: org/sonatype/aether/version/VersionConstraint

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:166)
... 21 more
Caused by: java.lang.NoClassDefFoundError: org/sonatype/aether/version/VersionConstraint
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2442)
at java.lang.Class.getDeclaredMethods(Class.java:1808)
at com.google.inject.spi.InjectionPoint.getInjectionPoints(InjectionPoint.java:688)
at com.google.inject.spi.InjectionPoint.forInstanceMethodsAndFields(InjectionPoint.java:380)
at com.google.inject.internal.ConstructorBindingImpl.getInternalDependencies(ConstructorBindingImpl.java:164)
at com.google.inject.internal.InjectorImpl.getInternalDependencies(InjectorImpl.java:613)
at com.google.inject.internal.InjectorImpl.cleanup(InjectorImpl.java:569)
at com.google.inject.internal.InjectorImpl.initializeJitBinding(InjectorImpl.java:555)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:884)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:805)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:282)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:214)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:1006)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1038)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1001)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1051)
at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:81)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:53)
at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:65)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:115)
at org.eclipse.sisu.bean.BeanScheduler$Activator.onProvision(BeanScheduler.java:176)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:126)
at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:68)
at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:63)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
at org.apache.maven.shared.dependency.graph.internal.DefaultDependencyGraphBuilder.buildDependencyGraph(DefaultDependencyGraphBuilder.java:60)
at org.apache.maven.plugin.dependency.TreeMojo.execute(TreeMojo.java:202)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.version.VersionConstraint
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)
... 63 more

 

查询:

Caused by: java.lang.NoClassDefFoundError: org/sonatype/aether/version/VersionConstraint 

 

根据:https://cwiki.apache.org/confluence/display/MAVEN/AetherClassNotFound

https://issues.apache.org/jira/browse/MDEP-407的说明:maven-dependency-plugin2.8以后的版本已经修复了这个问题,所以

使用:

mvn  org.apache.maven.plugins:maven-dependency-plugin:2.8:tree -X

 

就确实没有这个问题了。

 

分享到:
评论

相关推荐

    java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource解决方案

    执行`./gradlew build`或`./gradlew compileJava`,Gradle会处理其余部分。 一旦这些库被正确引入,你应该可以正常实例化和使用`BasicDataSource`,例如: ```java import org.apache.commons.dbcp....

    JSON中,java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher问题解决

    标题中的“JSON中,java.lang.NoClassDefFoundError: net/sf/ezmorph/Morpher...在实践中,使用像`mvn dependency:tree`(Maven)或`./gradlew dependencies`(Gradle)这样的命令来检查项目的依赖结构也是很有用的。

    Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Transformer异常

    在这个特定的场景中,异常堆栈跟踪显示了 `Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections.Transformer`,这表明系统无法找到 `org.apache.commons.collections.Transformer` 类。...

    java.lang.UnsupportedClassVersionError问题解决

    ### java.lang.UnsupportedClassVersionError问题解析与解决方案 在Java开发过程中,经常会在部署或运行时遇到`java.lang.UnsupportedClassVersionError`错误。该错误通常发生在类文件版本与JVM(Java虚拟机)版本...

    使用IDEA启动项目遇见ClassNotFoundException的解决方案

    Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ....... 二、正确的解决姿势 1. 是否添加了mysql驱动 在pom.xml文件中...

    Maven问题:Downloading from central: https://repo1.maven.org/maven2/org/apache/maven/plugins/maven-a

    很奇怪,我的maven仓库配置了私有库,,并且在maven setting.xml中配置了mirror(阿里云的镜像),但是,经常会遇到执行mvn命令的时候,会提醒,下载不下来。 解决方式:在项目的pom.xml中添加如下一段代码: ...

    jasperreports mvn的依赖包olap4j-0.9.7.309-JS-3

    下载之后再maven的bin目录下使用mvn命令:mvn install:install-file -Dfile=F:\apache-maven-3.5.3\mylib\olap4j-0.9.7.309-JS-3.jar -DgroupId=org.olap4j -DartifactId=olap4j-0.9.7.309-JS-3 -Dversion=0.9.7.309...

    springside-core-4.2.2.GA(含关联的test.jar)

    pom.xml配置 ...mvn install:install-file -DgroupId=org.springside -DartifactId=springside-core -Dversion=4.2.2.GA -Dfile=./springside-core-4.2.2.GA.jar -Dpackaging=jar -DgeneratePom=true

    JavaMail抛java.lang.NoClassDefFoundError (comsunmailutilLineInputStream)异常解决方案

    JavaMail在进行电子邮件发送时,可能会遇到`java.lang.NoClassDefFoundError`异常,特别是当尝试使用`com.sun.mail.util.LineInputStream`类时。这个异常通常表示在运行时找不到某个类的定义,即使该类在编译时是...

    camel-osgi-service-consumer

    camel-osgi-service-consumer 支持服务和bean 安装-s mvn:com.pronoia.test.osgi / service-interface / 1.0.0-SNAPSHOT mvn:com.pronoia.test.osgi / service-one / 1.0.0-SNAPSHOT mvn:...bean-one / 1.0.0-...

    org.apache.servicemix.bundles.xmlbeans-2.4.0_1.jar

    org.apache.servicemix.bundles.xmlbeans-2.4.0_1.jar

    com.oracle.ojdbc6-11.1.0.7.0

    Oracle JDBC驱动程序是Oracle数据库与Java应用程序之间的桥梁,它允许Java开发者通过编写Java代码来访问和操作Oracle数据库。com.oracle.ojdbc6-11.1.0.7.0是Oracle公司发布的JDBC驱动程序的一个特定版本,主要用于...

    mywicket-osgi:测试osgi wicket集成

    步骤在卡拉夫安装一个wab 1,安装karaf war功能:$ feature:安装war 2,安装wicket软件包和commons-io:$ bundle:install mvn:org.apache.wicket / wicket-util / 7.0.0-SNAPSHOT $ bundle:install mvn:org....

    HWAAAS:硬件加速即服务

    功能:回购添加mvn:org.apache.camel.karaf / apache-camel / 2.15.2 / xml / features 功能:安装骆驼 功能:安装opencl-feature 注意:此项目包含JavaCL Project中的库。 有关更多详细信息,请参见 。

    dingtalk-sdk-java.zip

    先把dingtalk-sdk-java安装到本地的 maven库...mvn install:install-file -Dfile=/Users/dufuzhong/MyData/MyCode/demo/dingtalk-sdk-java/taobao-sdk-java-auto_1479188381469-20200703.jar -DgroupId=dingding -Darti

    karaf cxf

    org.ops4j.pax.web-3.0.5|mvn:org.ops4j.pax.web/pax-web-features/3.0.5/xml/features cxf|mvn:org.apache.cxf.karaf/apache-cxf/xx.xx.xx/xml/features enterprise-3.0.0|mvn:org.apache.karaf.features/...

    jasperreports mvn依赖包olap4j-0.9.7.309-JS-3

    jasperreports mvn依赖包olap4j-0.9.7.309-JS-3,编译后缺少依赖包olap4j-0.9.7.309-JS-3。

    opc-ua-client:OPC-UA客户端用户界面

    OPC-UA客户端用户界面如何构建和运行需要什么: 最新稳定的 最新稳定的mvn clean installjava -jar opcua-ui/target/opc-ua-client-jar-with-dependencies.jarOPC-UA模拟服务器端点网址关联opc.tcp://opcua.demo-...

    mvn-search:讨厌search.maven.org UI的命令行界面

    mvn-search用于搜索Maven Central的命令行工具 对于那些喜欢在命令行中搜索Maven依赖关系而不是search.maven.org的Web UI的开发人员而言,这是一个实用程序 安装 先决条件:应安装节点10.9.0或更高版本。 npm ...

    DM8达梦数据库驱动包 DmJdbcDriver18.jar

    2.java应用开发连接达梦数据库作为驱动引入工程。 3.使用maven安装到本地仓库,在pom文件中引用。 注:使用mvn命令安装到本地库步骤如下: 步骤一:下载本zip安装包,解压后放到本地电脑的/xxx/xxx路径(注意mac和...

Global site tag (gtag.js) - Google Analytics