Maven内部.aether和eclipse以太网-实用程序依赖性问题

zi8p0yeb  于 2022-12-11  发布在  Maven
关注(0)|答案(1)|浏览(136)

我在启动应用程序时遇到下面的异常。我不确定问题到底出在哪里。我试着从maven核心中排除它们,但仍然遇到同样的异常。任何帮助/建议都是值得感谢的。

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.apache.maven.internal.aether.DefaultRepositorySystemSessionFactory.newRepositorySession(DefaultRepositorySystemSessionFactory.java:180)

The following method did not exist:

    org.eclipse.aether.util.repository.DefaultMirrorSelector.add(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ljava/lang/String;)Lorg/eclipse/aether/util/repository/DefaultMirrorSelector;

The calling method's class, org.apache.maven.internal.aether.DefaultRepositorySystemSessionFactory, was loaded from the following location:

    jar:file:/Users/username/.m2/repository/org/apache/maven/maven-core/3.8.1/maven-core-3.8.1.jar!/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.class

The called method's class, org.eclipse.aether.util.repository.DefaultMirrorSelector, is available from the following locations:

    jar:file:/Users/username/.m2/repository/org/eclipse/aether/aether-util/1.1.0.redhat-1/aether-util-1.1.0.redhat-1.jar!/org/eclipse/aether/util/repository/DefaultMirrorSelector.class

The called method's class hierarchy was loaded from the following locations:

    org.eclipse.aether.util.repository.DefaultMirrorSelector: file:/Users/username/.m2/repository/org/eclipse/aether/aether-util/1.1.0.redhat-1/aether-util-1.1.0.redhat-1.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.apache.maven.internal.aether.DefaultRepositorySystemSessionFactory and org.eclipse.aether.util.repository.DefaultMirrorSelector
n53p2ov0

n53p2ov01#

我不知道库,但这可能是依赖项版本不兼容的问题(无论调用是否从另一个库进行)。
从我在你的帖子中看到的情况来看,你打了如下电话:

org.eclipse.aether.util.repository.DefaultMirrorSelector.add(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZLjava/lang/String;Ljava/lang/String;)Lorg/eclipse/aether/util/repository/DefaultMirrorSelector;

在docs 1.9.0版中,我看到了以下API:

https://maven.apache.org/resolver/apidocs/org/eclipse/aether/util/repository/DefaultMirrorSelector.html
希望能有所帮助。

相关问题