idea再创建一个项目的时候maven出现异常

来源:5-5 jdk、tomcat、maven配置及初始化web空白项目

指令狂人

2017-09-21

"C:\Program Files\Java\jdk1.8.0_111\bin\java" -Dmaven.multiModuleProjectDirectory=C:\Users\HP\AppData\Local\Temp\archetype8tmp -Dmaven.home=F:\Maven\maven_bin\apache-maven-3.3.9 -Dclassworlds.conf=F:\Maven\maven_bin\apache-maven-3.3.9\bin\m2.conf -Dfile.encoding=UTF-8 -classpath F:\Maven\maven_bin\apache-maven-3.3.9\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=15.0.6 -DinteractiveMode=false -DgroupId=com -DartifactId=mmall -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-webapp -DarchetypeVersion=RELEASE org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate

[INFO] Scanning for projects...

[INFO]                                                                         

[INFO] ------------------------------------------------------------------------

[INFO] Building Maven Stub Project (No POM) 1

[INFO] ------------------------------------------------------------------------

[INFO] 

[INFO] >>> maven-archetype-plugin:3.0.1:generate (default-cli) > generate-sources @ standalone-pom >>>

[INFO] 

[INFO] <<< maven-archetype-plugin:3.0.1:generate (default-cli) < generate-sources @ standalone-pom <<<

[INFO] 

[INFO] --- maven-archetype-plugin:3.0.1:generate (default-cli) @ standalone-pom ---

Downloading: https://repo.maven.apache.org/maven2/commons-codec/commons-codec/1.6/commons-codec-1.6.jar

[INFO] ------------------------------------------------------------------------

[INFO] BUILD FAILURE

[INFO] ------------------------------------------------------------------------

[INFO] Total time: 25.077 s

[INFO] Finished at: 2017-09-21T22:26:30+08:00

[INFO] Final Memory: 10M/155M

[INFO] ------------------------------------------------------------------------

[ERROR] 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:RELEASE or one of its dependencies could not be resolved: Could not transfer artifact commons-codec:commons-codec:jar:1.6 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: Connection timed out: connect -> [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

[ERROR] Maven execution terminated abnormally (exit code 1)


写回答

1回答

Geely

2017-09-21

Could not transfer artifact commons-codec:commons-codec:jar:1.6 from/to central (https://repo.maven.apache.org/maven2): Connect to repo.maven.apache.org:443 [repo.maven.apache.org/151.101.196.215] failed: Connection timed out: connect -> [Help 1


同学,这个是关键异常,请把maven仓库更改成阿里云的仓库 就好啦,之前有同学碰到

0
2
Geely
回复
指令狂人
是的,有时候和网速,仓库的网速...IDE也许有关系。。和ide这个还真不确定。。。
2017-09-21
共2条回复

从0开始 独立完成企业级Java电商网站服务端开发

前后端分离,数据库接口设计,架构设计,功能开发,上线运维

9476 学习 · 8804 问题

查看课程