Maven 构建因缺少依赖项而失败 - 初学者

发布于 2024-12-03 07:32:56 字数 864 浏览 0 评论 0原文

[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]

似乎缺少多个依赖项,我应该如何添加它们?是否有一个地方可以让我获得依赖项,或者是否有特定的标准编写方式?

[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]

Seems like there are more than one dependencies missing, How should i add them ? Is there a place where i could get the dependency or is there a particular standard way of writing it ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

债姬 2024-12-10 07:32:56

org.springframework.web.servlet = spring-web 或 spring-webmvc 或两者都取决于您需要的内容

org.springframework.context = spring-context

com.springsource.javax.transaction 来自 SpringSource 企业包存储库

struts2-ssl-plugin 不在中央。您必须在另一个存储库中找到它,安装它本地,将其安装在您自己的存储库上,例如Nexus,或者将其设为系统范围的依赖

工具是你的JRE。 Maven 通常不应该尝试下载它。你可能在某个地方有不好的依赖。

org.springframework.web.servlet = spring-web or spring-webmvc or both depending on what you need from it

org.springframework.context = spring-context

com.springsource.javax.transaction comes from the SpringSource enterprise bundle repository.

struts2-ssl-plugin isn't in central. You'll have to find it in another repository, install it locally, install it on your own repository, like Nexus, or make it a system-scoped dependency.

tools is your JRE. Maven mostly shouldn't be trying to download it. You probably have a bad dependency somewhere.

花开柳相依 2024-12-10 07:32:56

从以下位置下载最新的 jar 文件
http://code.google.com/p/struts2-ssl-plugin /downloads/list

运行以下命令
struts2-ssl-plugin-1.2.1.jar 文件的示例

mvn install:install-file -Dfile=E:\Java\Meteors\struts2-ssl-plugin-1.2.1.jar -DgroupId =com.googlecode.sslplugin -DartifactId=struts2-ssl-plugin -Dversion=1.2.1 -D包装=jar

Download the latest jar file from following location
http://code.google.com/p/struts2-ssl-plugin/downloads/list

Run the following command
Example for struts2-ssl-plugin-1.2.1.jar file

mvn install:install-file -Dfile=E:\Java\Meteors\struts2-ssl-plugin-1.2.1.jar -DgroupId=com.googlecode.sslplugin -DartifactId=struts2-ssl-plugin -Dversion=1.2.1 -Dpackaging=jar

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文