请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

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

"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 22:32:25

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 回复 有任何疑惑可以回复我~
  • 提问者 指令狂人 #1
    之前的项目前期是在MyEclipse上写的之后又pull到idea,eclipse上创建项目时候就没问题,老师出这个问题跟IDE有关吗?
    回复 有任何疑惑可以回复我~ 2017-09-21 22:47:11
  • Geely 回复 提问者 指令狂人 #2
    是的,有时候和网速,仓库的网速...IDE也许有关系。。和ide这个还真不确定。。。
    回复 有任何疑惑可以回复我~ 2017-09-21 23:26:09
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信