java - “mvn install”在尝试下载时不起作用并显示错误

标签 java maven-2 netbeans jakarta-ee maven

我使用的是 maven 3.0.2 版本。

mvn --version 在命令行上工作正常但是当我尝试 mvn install 它不起作用并显示以下错误。

Z:\dev\hector rantav>mvn install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/junit/junit/3.8.2/junit-3.8.2.jar
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project me.prettyprint:hector:0.7.0-24-SNAPSHOT (Z:\dev\hector ran
tav\pom.xml) has 1 error
[ERROR]     Unresolveable build extension: Plugin org.apache.maven.scm:maven-scm
-manager-plexus:1.3 or one of its dependencies could not be resolved: Could not
transfer artifact junit:junit:jar:3.8.2 from/to central (http://repo1.maven.org/
maven2): Error transferring file: repo1.maven.org: Unknown host repo1.maven.org
-> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[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 rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildin
gException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException

请告诉我如何解决这个问题。

最佳答案

代理使用是一个因素,希望这会有所帮助:Maven Guide to Using Proxies

如果您的代理需要 NTLM 身份验证,您可能还需要 cntlm

关于java - “mvn install”在尝试下载时不起作用并显示错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4707834/

相关文章:

maven-2 - Maven,过滤非资源文件

java - 在单独的线程中运行逻辑仍然锁定 UI - Java

java - 如何在J2me中制作 GridView

java - Netbeans IDE 教程

java - 等待 2 个线程在继续程序之前完成

spring - java.lang.ClassNotFoundException : org. springframework.web.servlet.DispatcherServlet

java - 解压带有重音符号的 zip 文件

java - 在这种情况下 maven-assemble-plugin 是否有效

java - 替换属性文件键中的所有空格

java - 如何使用 BasicHttpBinding 和 BasicHttpSecurityMode.TransportWithCredential : 将 header 元素 "mustunderstand=0"设置到 SOAP 请求中