我在NetBeans8.0中创建了maven项目,并在打印helloworld.when的项目中添加了java类。我尝试运行该项目,它显示以下错误,并花费15分钟来完成运行。
cd C:\Users\selva\Documents\NetBeansProjects\SelvaMaven; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_05" cmd /c "\"\"C:\\Program Files\\NetBeans 8.0\\java\\maven\\bin\\mvn.bat\" -Dexec.args=\"-classpath %classpath com.mycompany.selvamaven.SelDur\" -Dexec.executable=\"C:\\Program Files\\Java\\jdk1.8.0_05\\bin\\java.exe\" -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.0\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 -Djava.net.useSystemProxies=true process-classes org.codehaus.mojo:exec-maven-plugin:1.2.1:exec\""
Scanning for projects...
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.2.1/exec-maven-plugin-1.2.1.pom
Oct 09, 2014 12:11:04 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Malformed reply from SOCKS server
Oct 09, 2014 12:11:05 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
Oct 09, 2014 12:16:05 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Malformed reply from SOCKS server
Oct 09, 2014 12:16:05 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
Oct 09, 2014 12:21:06 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: I/O exception (java.net.SocketException) caught when connecting to the target host: Malformed reply from SOCKS server
Oct 09, 2014 12:21:06 PM org.apache.maven.wagon.providers.http.httpclient.impl.client.DefaultRequestDirector tryConnect
INFO: Retrying connect
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 20:02.044s
Finished at: Thu Oct 09 12:26:06 IST 2014
Final Memory: 4M/99M
------------------------------------------------------------------------
Plugin org.codehaus.mojo:exec-maven-plugin:1.2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:exec-maven-plugin:jar:1.2.1: Could not transfer artifact org.codehaus.mojo:exec-maven-plugin:pom:1.2.1 from/to central (http://repo.maven.apache.org/maven2): Malformed reply from SOCKS server -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException如何解决这个问题?任何帮助都将不胜感激!
发布于 2014-11-25 23:02:25
不要使用与netbeans捆绑在一起的maven,而是在pc上安装maven,并让netbeans引用它。然后使用您的代理配置编辑/conf/settings文件:
<proxies>
<proxy>
<active>true</active>
<host>yourproxy</host>
<port>8080</port>
</proxy>
</proxies>然后将wagon-http-lightweight-2.2.jar放到maven /lib/ext目录中。
发布于 2014-10-09 15:11:03
https://stackoverflow.com/questions/26272072
复制相似问题