我有一些问题需要正确地配置eclipse来处理maven。
我创建了一个新项目,这个项目是用maven in命令行(mvn install)正确构建的,但是在Eclipse中,我得到了以下错误:
org.apache.maven.plugins:maven-compiler-plugin:3.1 :无法获得用于插件执行的参数compilerId的值- CoreException: PluginResolutionException: plugin CoreException或其依赖项之一无法解决:未能为org.apache.maven.plugins:maven-compiler-plugin:jar:3.1 ()收集依赖项: ArtifactDescriptorException:未能读取org.apache.maven:maven-设置的工件描述符:jar:2.2.1: ArtifactResolutionException:未能传输org.apache.maven:maven-设置:pom:2.2来自.1的http://repo.maven.apache.org/maven2缓存在本地存储库中,在中央更新间隔已过或强制更新之前,将不会重新尝试解析。原始错误:无法将工件org.apache.maven: Maven -设置:pom:2.2.1从/转到central : NullPointerException pom.xml /test第9行Maven Project构建生命周期映射问题
这是我的settings.xml conf:
<proxy>
<active>true</active>
<protocol>http</protocol>
<username>myuser</username>
<password>$mymdp</password>
<host>myhost</host>
<port>8080</port>
<nonProxyHosts>some.host.com</nonProxyHosts>
</proxy>
....
<repository>
<id>central</id>
<name>central repo m2</name>
<url>http://central.maven.org/maven2</url>
</repository>我选择正确的maven安装(首选-> Maven ->安装)
我还将用户设置定向到正确的settings.xml (Preferences -> Maven ->用户设置)
但是我在Eclipse中仍然有这个错误,而且maven命令行一切都进行得很好。你有想法吗?
发布于 2014-03-13 08:19:29
您试过删除代理用户名和密码吗?一个类似的海报遇到了这一问题:
未能做到这一点,我发现以下几点行之有效:
mvn依赖:解决
发布于 2017-02-16 02:39:35
您只需要删除它正在抛出错误的一个文件夹。只需转到您的M2回购和M2,并删除文件夹2.3.2
发布于 2018-02-15 20:05:08
当使用IBMRSA9.6.1构建一台全新的开发机器时,我遇到了这个问题。对我来说,问题最终是由于Global存储库上的HTTPS。我的解决方案是创建一个Maven settings.xml,强制它使用HTTP。
对我来说,关键是当我在Maven存储库下爆炸时,中央存储库是空的-- >全局存储库
使用下列设置文件对我有效:
<settings>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>insecurecentral</activeProfile>
</activeProfiles>
<profiles>
<profile>
<id>insecurecentral</id>
<!--Override the repository (and pluginRepository) "central" from the Maven Super POM -->
<repositories>
<repository>
<id>central</id>
<url>http://repo.maven.apache.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://repo.maven.apache.org/maven2</url>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</settings>https://stackoverflow.com/questions/21579247
复制相似问题