NetBeans 8.2新项目Maven WebApplication构建失败连接重置

时间:2018-07-15 01:52:36

标签: maven netbeans

尝试在NetBeans 8.2中创建新的Maven Web应用程序时如何解决连接重置问题?

场景:  新建项目... Maven / WebApplication ...下一步...完成。 输出:

    cd F:\G_2015\Documents\NetBeansProjects; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_65" cmd /c "\"\"C:\\Program Files\\NetBeans 8.2\\java\\maven\\bin\\mvn.bat\" -DarchetypeGroupId=org.codehaus.mojo.archetypes -DarchetypeArtifactId=webapp-javaee7 -DarchetypeVersion=1.1 -DarchetypeRepository=http://repo.maven.apache.org/maven2 -DgroupId=com.mycompany -DartifactId=mavenproject4 -Dversion=1.0-SNAPSHOT -Dpackage=com.mycompany.mavenproject4 -Dbasedir=F:\\G_2015\\Documents\\NetBeansProjects -Darchetype.interactive=false -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans 8.2\\java\\maven-nblib\\netbeans-eventspy.jar\" --batch-mode archetype:generate\""
Scanning for projects...

------------------------------------------------------------------------
Building Maven Stub Project (No POM) 1
------------------------------------------------------------------------

>>> maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom >>>

<<< maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom <<<

--- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom ---
Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-velocity/1.1.8/plexus-velocity-1.1.8.pom
Jul 14, 2018 6:41:04 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://repo.maven.apache.org:80: Connection reset
Jul 14, 2018 6:41:04 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://repo.maven.apache.org:80
Jul 14, 2018 6:41:04 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://repo.maven.apache.org:80: Connection reset
Jul 14, 2018 6:41:04 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://repo.maven.apache.org:80
Jul 14, 2018 6:41:04 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: I/O exception (java.net.SocketException) caught when processing request to {}->http://repo.maven.apache.org:80: Connection reset
Jul 14, 2018 6:41:04 PM org.apache.maven.wagon.providers.http.httpclient.impl.execchain.RetryExec execute
INFO: Retrying request to {}->http://repo.maven.apache.org:80
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 0.817s
Finished at: Sat Jul 14 18:41:04 CDT 2018
Final Memory: 11M/368M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate failed: Plugin org.apache.maven.plugins:maven-archetype-plugin:3.0.1 or one of its dependencies could not be resolved: Failed to collect dependencies for org.apache.maven.plugins:maven-archetype-plugin:jar:3.0.1 (): Failed to read artifact descriptor for org.codehaus.plexus:plexus-velocity:jar:1.1.8: Could not transfer artifact org.codehaus.plexus:plexus-velocity:pom:1.1.8 from/to central (http://repo.maven.apache.org/maven2): Connection reset -> [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

故障排除: http://repo.maven.apache.org/maven2在浏览器中确定。

您知道NetBeans为什么重置连接吗?

UPDATE(7/21): 尽管以上http://repo.maven.apache.org/maven2在浏览器中有效, http://repo.maven.apache.org/maven2/velocity/失败!别人还好吗? 我尝试在手机上成功打出这个VELOCITY地址。 因此,这告诉我NetBeans可能不是问题,而是我的网络设置有问题。 我当前的网络设置为ProxyServer = OFF和AutomaticallyDetectSettings = ON。 另外,网络设置被设置为DHCP自动获取IP地址。 我已打开防火墙日志记录,以查看Defender是否阻止了任何内容。

UPDATE(7 / 21-B): 现在,在浏览器中将HTTP切换为HTTPS会导致在浏览器中成功打开https://repo.maven.apache.org/maven2/velocity/。 因此,看来NetBeans没有使用HTTPS。

任何想法表示赞赏。

0 个答案:

没有答案