mvn软件包错误:未知主机repo.maven.apache.org

伊凡·菲利普·王子

我正在使用intelliJ IDEA 14.1.4

mvn package

输入我收到此消息

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------

[INFO] Building test1 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.3/maven-resources-plugin-2.3.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 21.344s
[INFO] Finished at: Sat Dec 12 15:00:57 IST 2015
[INFO] Final Memory: 9M/88M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.3: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.3 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org: Name or service not known: Unknown host repo.maven.apache.org: Name or service not known -> [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/PluginResolutionException

我已经在〜/ .m2 / setting.xml中设置了代理,但是仍然会收到此错误。请帮助..

巴拉布斯

在您的pom.xml所在的路径中尝试以下命令,

$ git config --global url."https://".insteadOf git:/

它为我工作。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

Maven软件包错误:org.apache.commons-lang不存在(Java)

maven:UnknownHostException:repo.maven.apache.org

Maven项目中缺少org.apache.commons.dbcp软件包

Nexus代理repo.maven.apache.org无法正常工作

pom 错误 - org.apache.maven.archiver.MavenArchiver.getManifes

无法从https://repo.maven.apache.org/maven2传输org.apache.maven.plugins:maven-surefire-plugin:pom:2.22.2

Ant中的“无法创建任务或键入antlib:org.apache.maven.artifact.ant:mvn”错误

连接到repo.maven.apache.org时如何配置Maven以使用HTTPS

错误无法执行目标 org.apache.maven.plugins:maven-compiler-plugin:3.8.0:testCompile

maven-surefire-report-plugin 2.8错误:org.apache.maven.doxia.siterenderer.sink.SiteRendererSink.unknown

无法传输http://repo.maven.apache.org/maven2-错误代码501,需要HTTPS

无法将工件org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1从中央传输到中央(http://repo1.maven.org/maven2)

可以找到关于mvnrepository.com Maven的依赖关系,而不是repo.maven.apache.org/maven2/

UnsupportedClassVersionError:org / apache / maven / plugin / compiler / TestCompilerMojo

org.apache软件包无法在Eclipse中解析

对象kafka不是软件包org.apache的成员

软件包org.apache.poi.ss.usermodel不存在错误

Maven构建错误-无法执行目标org.apache.maven.plugins:maven-dependency-plugin:2.8:copy(复制)

Maven 错误无法从/向中央传输工件 org.apache.maven.plugins:maven-source-plugin:pom:3.0.1

Maven编译错误-无法执行目标org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile

org.apache.maven.plugins:maven-compiler-plugin失败

运行sbt软件包时出错:对象apache不是软件包org的成员

JDK9模块-Maven-如何导入例如org.apache.http包?

Java eclipse无法识别已经通过maven导入的import org.apache.poi包

Maven包org.apache.commons.codec.binary不存在

在 https://repo.maven.apache.org/maven2 中找不到 spring-boot-starter-parent pom

JHipster错误:无法找到或加载主类org.apache.maven.wrapper.MavenWrapperMain

添加Maven依赖项后,org.apache.catalina.filters.CSRF_NONCE错误消息

无法在https://repo.maven.apache.org/maven2中找到org.jenkins-ci.plugins:plugin:pom:2.11