[ERROR] Failed to execute goal on project CarProject: Could not resolve dependen
cies for project CarProject:CarProject:war:1.0-SNAPSHOT: The following artifacts
could not be resolved: com.googlecode.sslplugin:struts2-ssl-plugin:jar:1.2.1, o
rg.springframework:org.springframework.web.servlet:jar:3.0.5.RELEASE, org.spring
framework:org.springframework.context:jar:3.0.5.RELEASE, javax.transaction:com.s
pringsource.javax.transaction:jar:1.1.0, com.sun:tools:jar:1.6.0: Failure to fin
d com.googlecode.sslplugin:struts2-ssl-plugin:jar:1.2.1 in http://repo1.maven.or
g/maven2 was cached in the local repository, resolution will not be reattempted
until the update interval of central has elapsed or updates are forced -> [Help
1]
似乎缺少多个依赖项,我应该如何添加它们?是否有地方可以获取依赖项,或者是否有特定的标准编写方式?
最佳答案
org.springframework.web.servlet = spring-web 或 spring-webmvc 或两者,具体取决于您的需要
org.springframework.context = spring-context
com.springsource.javax.transaction 来自SpringSource enterprise bundle repository .
struts2-ssl-plugin 不在中央。您必须在另一个存储库中找到它, install it locally ,将其安装在您自己的存储库中,例如 Nexus ,或将其设为 system-scoped dependency .
tools 是您的 JRE。 Maven 通常不应该尝试下载它。您可能在某个地方有不好的依赖性。
关于java - Maven 构建因缺少依赖项而失败 - 初学者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7337427/