anyuan2002.com - vwin网

查找: 您的方位主页 > 电脑频道 > 电脑教程 > 阅览资讯:遇到的问题----新建maven项目ArtifactTransferException 和Execution defau

遇到的问题----新建maven项目ArtifactTransferException 和Execution defau

2019-04-01 07:18:38 来历:www.anyuan2002.com 【

 

第一种过错:

ArtifactTransferException: Failure to transfer com.google.collections:google-collections:jar:1.0 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 com.google.collections:google-collections:jar:1.0 from/to central (http://repo1.maven.org/maven2):
No response received after 60000

 

 

第二种过错:

Execution default-testResources of goal org.apache.maven.plugins:maven-resources-plugin:2.4.3:testResources failed: Unable to load
the mojo 'testResources' in the plugin 'org.apache.maven.plugins:maven-resources-plugin:2.4.3'. A required class is missing: Lorg/sonatype/
plexus/build/incremental/BuildContext; ----------------------------------------------------- realm = plugin>org.apache.maven.plugins:maven-
resources-plugin:2.4.3 strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy urls[0] = file:/D:/maven/repository/org/apache/
maven/plugins/maven-resources-plugin/2.4.3/maven-resources-plugin-2.4.3.jar urls[1] = file:/D:/maven/repository/org/apache/maven/
reporting/maven-reporting-api/2.0.6/maven-reporting-api-2.0.6.jar urls[2] = file:/D:/maven/repository/org/apache/maven/doxia/doxia-sink-api/
1.0-alpha-7/doxia-sink-api-1.0-alpha-7.jar urls[3] = file:/D:/maven/repository/commons-cli/commons-cli/1.0/commons-cli-1.0.jar urls[4] = file:/
D:/maven/repository/org/codehaus/plexus/plexus-interactivity-api/1.0-alpha-4/plexus-interactivity-api-1.0-alpha-4.jar urls[5] = file:/D:/maven/
repository/junit/junit/3.8.1/junit-3.8.1.jar urls[6] = file:/D:/maven/repository/org/codehaus/plexus/plexus-utils/2.0.5/plexus-utils-2.0.5.jar u

 

如图:

遇到的问题----新建maven项目ArtifactTransferException 和Execution default-testResources of goal

 

这两个过错的原因是本工程依靠的包 在本地库房中存在,从前下载中超时或许未下载成功。

Maven不管下没下成功,都会有一个.lastupdate文件,一旦呈现了这个文件,而你指定长途库房的方法是mirror,而不是profile里的repository,那么Maven默许不会去更新这个文件

 

 

处理方法两个过程:

1.找到自己的本地库房,(有关本地库房详见:Maven本地库房途径修正),默许的途径在本地用户的临时文件夹下面的 .m2 文件夹下的 repository 下,例如:C:\Users\joe\.m2\repository repository下的文件夹悉数删去,或许只把相关报错的包的目录删去

 

2. MyEclipse --> Preferences -->Maven4MyEclipse ---> User Settings

点击按钮 Update Settings 和 点击 Reindex按钮

改写项目,应该就没有报错信息了,假如还有,试试重启MyEclipse再改写项目

遇到的问题----新建maven项目ArtifactTransferException 和Execution default-testResources of goal

 

 

遇到的问题----新建maven项目ArtifactTransferException 和Execution default-testResources of goal

 

 

 
 

本文地址:http://www.anyuan2002.com/dnjc/100201.html
Tags: 问题 新建 ----
修改:vwin网
关于咱们 | 联络咱们 | 友情链接 | 网站地图 | Sitemap | App | 回来顶部