简体   繁体   English

更新Maven时出错-Spring MVC项目

[英]Error in Updating Maven - Spring MVC project

I am new to Spring MVC framework.I am trying to develop a web application following these steps here . 我是Spring MVC framework的新手。我试图按照这里的步骤开发Web应用程序。 I was going on well until I reached the stage of updating Maven to include dependencies; 我一直做得很好,直到达到更新Maven以包括依赖项的阶段为止。 I got the following error after right click project --> Maven --> Update Project -tick Force Update of Snapshots/Releases --> Finish. 右键单击项目-> Maven->更新项目-tick强制更新快照/发布->完成后,出现以下错误

UPDATE 更新

The following errors is shown in the IDE: IDE中显示以下错误:

`ArtifactDescriptorException: Failed to read artifact descriptor for javax.inject:javax.inject:jar:1: ArtifactResolutionException: Could not transfer artifact javax.inject:javax.inject:pom:1 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org pom.xml /HelloSpringMVC line 1  Maven Dependency Problem`

CoreException: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-compiler-plugin:2.5.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-compiler-plugin:jar:2.5.1: ArtifactResolutionException: Could not transfer artifact org.apache.maven.plugins:maven-compiler-plugin:pom:2.5.1 from/to central (http://repo.maven.apache.org/maven2): repo.maven.apache.org pom.xml /HelloSpringMVC line 136 Maven Project Build Lifecycle Mapping Problem

Set up the same example at my end and generated the issue. 最后,设置相同的示例并产生问题。

Perform the following steps to fix the issue 执行以下步骤解决问题

right click project --> Maven --> Update Project -tick Force Update of Snapshots/Releases --> Finish. 右键单击项目-> Maven->更新项目-tick强制更新快照/发布->完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM