51Testing软件测试论坛

标题: 新建maven项目报错 [打印本页]

作者: 草帽路飞UU    时间: 2017-7-13 16:33
标题: 新建maven项目报错
如果你是通过自己手动下载maven插件包,那么你可能会遇到在新建maven项目的时候,eclipse会报错,具体错误信息如下:
Build errors for T1; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources (default-resources) on project T1: Execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:resources failed: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failure to transfer org.codehaus.plexus:plexus-interpolation:jar:1.13 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.codehaus.plexus:plexus-interpolation:jar:1.13 from/to central (http://repo1.maven.org/maven2): No response received after 60000
原因:下载的maven插件包缺失文件
解决方案:
第一步:点击eclipse->Window->Preferenes->Meven->Installations,添加maven的安装文件,如下图所
[attach]107401[/attach]
第二步:修改maven项目的pom.xml文件,具体内容可点击该链接进行查看,http://pan.baidu.com/s/1hqzhHFe
把具体内容更改为自己的项目内容就可以了
第三步:选择pom.xml文件右键选择Run as->Maven build,如下
[attach]107402[/attach]然后选择你需要的内容,点击run按钮,其就能自动下载缺少的文件了

作者: 八戒你干嘛    时间: 2017-7-13 17:21
目前好像没遇到啊?




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2