Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
420 views
in Technique[技术] by (71.8m points)

maven - 强制行家更新(Force maven update)

I imported my working project on other computer so it started to download dependencies.

(我将工作项目导入其他计算机,因此它开始下载依赖项。)

Apparently in the meantime my internet connection crashed.

(显然与此同时,我的互联网连接崩溃了。)

Now I get:

(现在我得到:)

Build errors for comics;

(建立漫画错误;)

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project comicsTest: Could not resolve dependencies for project comicsTest:comicsTest:war:0.0.1-SNAPSHOT: The following artifacts could not be resolved: org.springframework:spring-context:jar:3.0.5.RELEASE, org.hibernate:hibernate-entitymanager:jar:3.6.0.Final, org.hibernate:hibernate-core:jar:3.6.0.Final, org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final, org.aspectj:aspectjweaver:jar:1.6.8, commons-lang:commons-lang:jar:2.5,

(org.apache.maven.lifecycle.LifecycleExecutionException:无法在项目comics上执行目标Test:无法解决项目comics的依赖项Test:comicsTest:war:0.0.1-SNAPSHOT:无法解决以下工件:org.springframework:spring- context:jar:3.0.5.RELEASE,org.hibernate:hibernate-entitymanager:jar:3.6.0.Final,org.hibernate:hibernate-core:jar:3.6.0.Final,org.hibernate:hibernate-commons-批注:jar:3.2.0.Final,org.aspectj:aspectjweaver:jar:1.6.8,commons-lang:commons-lang:jar:2.5,)

mysql:mysql-connector-java:jar:5.1.13: Failure to transfer org.springframework:spring-context:jar:3.0.5.RELEASE 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.

(mysql:mysql-connector-java:jar:5.1.13:无法从本地存储库中缓存来自http://repo1.maven.org/maven2的 org.springframework:spring-context:jar:3.0.5.RELEASE传输,直到Central的更新间隔或强制进行更新后,才会重新尝试解析。)

Original error: Could not transfer artifact org.springframework:spring-context:jar:3.0.5.RELEASE from central ( http://repo1.maven.org/maven2 ): No response received after 60000

(原始错误:无法从中央( http://repo1.maven.org/maven2 )传输工件org.springframework:spring-context:jar:3.0.5.RELEASE:60000之后未收到响应)

And I have no idea how to force maven to update?

(而且我不知道如何强制Maven更新?)

  ask by M4ks translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
mvn clean install -U

-U means force update of snapshot dependencies.

(-U表示强制更新快照依赖项。)

Release dependencies can't be updated this way.

(发布依赖项无法通过这种方式进行更新。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...