maven下载的时候出现的问题,求大神指教 10
[WARNING]Anerroroccurredduringdependencyresolution.Failedtoretrieveorg.apache.struts:...
[WARNING] An error occurred during dependency resolution.
Failed to retrieve org.apache.struts:struts2-core-2.3.14.2
Caused by: Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.struts -DartifactId=struts2-co
re -Dversion=2.3.14.2 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.struts -DartifactId=struts2-core
-Dversion=2.3.14.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -Drepositor
yId=[id]
Path to dependency:
1) com.ailk.aiwmWap:aiwmWap:war:1.0-SNAPSHOT
2) org.apache.struts:struts2-core:jar:2.3.14.2
org.apache.struts:struts2-core:jar:2.3.14.2
from the specified remote repositories:
maven (http://repo1.maven.org/maven2),
codehaus (http://repository.codehaus.org/),
AsiainfoCUVSD (http://vsd.asiainfo.com/maven),
ibiblio (http://mirrors.ibiblio.org/pub/mirrors/maven2),
central (http://repo1.maven.org/maven2)
[INFO] Unable to read jar manifest from C:\Documents and Settings\Administrator\
.m2\repository\org\apache\struts\struts2-core\2.3.14.2\struts2-core-2.3.14.2.jar
[INFO] Using source status cache: D:\MyEclipse 8.5\cooding\aiwmWap2\target\mvn-e
clipse-cache.properties 展开
Failed to retrieve org.apache.struts:struts2-core-2.3.14.2
Caused by: Unable to download the artifact from any repository
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.struts -DartifactId=struts2-co
re -Dversion=2.3.14.2 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.struts -DartifactId=struts2-core
-Dversion=2.3.14.2 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -Drepositor
yId=[id]
Path to dependency:
1) com.ailk.aiwmWap:aiwmWap:war:1.0-SNAPSHOT
2) org.apache.struts:struts2-core:jar:2.3.14.2
org.apache.struts:struts2-core:jar:2.3.14.2
from the specified remote repositories:
maven (http://repo1.maven.org/maven2),
codehaus (http://repository.codehaus.org/),
AsiainfoCUVSD (http://vsd.asiainfo.com/maven),
ibiblio (http://mirrors.ibiblio.org/pub/mirrors/maven2),
central (http://repo1.maven.org/maven2)
[INFO] Unable to read jar manifest from C:\Documents and Settings\Administrator\
.m2\repository\org\apache\struts\struts2-core\2.3.14.2\struts2-core-2.3.14.2.jar
[INFO] Using source status cache: D:\MyEclipse 8.5\cooding\aiwmWap2\target\mvn-e
clipse-cache.properties 展开
2个回答
展开全部
maven下载出现问题一般有几种情况:一是网络中的maven中央仓库里没有你定义的jar依赖,更谈不上下载;二是中央仓库有,但是下载时出错,并没有将所有文件下载到你的本地仓库中,依然不起作用,这种情况可以去本地仓库查看,一般是缺少jar文件,因为没有下载下来。还有一种是已下载的jar的依赖jar包下载不到。这些信息都可以从提示的错误中慢慢找到。具体的解决办法一般是用原来的jar包引用方式补齐maven中央仓库没有的jar,或者使用第三方工具,如nexus管理仓库和jar包,这样就能更加灵活的管理依赖了。希望能有帮助。
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
尝试以下方式:
确保网络连接问题,与IE一致:在$Maven_Home/conf/settings.xml 设置。
确保pom.xml文件依赖正确:
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.2.1</version>
<scope>compile</scope>
</dependency>
3. 删除文件夹,重新下载 C:\***\.2\repository\org\apache\.struts
4. 更改下载库
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询