java - Maven 提示对 WAR 文件的依赖

标签 java maven

我正在尝试构建一个具有以下依赖项的项目

<dependency>
     <groupId>org.richfaces.examples</groupId>
     <artifactId>richfaces-showcase</artifactId>
     <version>4.3.4.Final</version>
     <classifier>jbas71</classifier>
     <type>war</type>
</dependency>

虽然 WAR 文件似乎位于我本地存储库中的正确位置。 .m2/repository/org/richfaces/examples/richfaces-showcase/4.3.4.Final/

的内容
  • richfaces-showcase-4.3.4.Final-jbas71.war
  • richfaces-showcase-4.3.4.Final-jbas71.war.lastUpdated
  • richfaces-showcase-4.3.4.Final-jbas71.war.pom

我尝试删除*.lastUpdated 文件,*.war.pom 似乎也可以,但我仍然得到

[ERROR] Failed to execute goal on project richfaces-showcase-portlet: 
Could not resolve dependencies for project org.jboss.portletbridge.examples:richfaces-showcase-portlet:war:3.3.1.Final: 
Failure to find org.richfaces.examples:richfaces-showcase:war:jbas71:4.3.4.Final in
http://repo.maven.apache.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 -> [Help 1]

最佳答案

依赖关系隐含错误,因为 war 文件并不打算成为依赖关系。 war 文件旨在用作示例,可以将其部署到 Tomcat 等中以查看其外观等。

除此之外,您正尝试从 Maven Central 获取 richfaces,但这是不可能的,因为 Richfaces 不在 Maven Central 中。他们有自己的存储库。您需要将此存储库添加到您的配置或存储库管理器中。

此外消息:

Failure to find org.richfaces.examples:richfaces-showcase:war:jbas71:4.3.4.Final in
http://repo.maven.apache.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 -> [Help 1]

显示无法下载依赖项。我假设war文件的大小是0..

关于java - Maven 提示对 WAR 文件的依赖,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21426781/

相关文章:

java - MongoDB 的唯一 int _id

android - 线程 "pool-1-thread-1"java.lang.NoClassDefFoundError : org/eclipse/aether/spi/connector/Transfer$State 中的异常

Eclipse/Maven/SonarQube : Invalid value of sonar. 库

java - 根据类路径上类的存在来测试代码

java - HtmlUnit - 选择表单、复选框、文本字段和提交按钮

java - 我在android studio中出错,但我不知道问题出在哪里

java - Java 中的 native 方法是否特定于操作系统?

java - 在线性时间内迭代包含 List 的 Map

maven - Sling 部署内容并使用 Maven 进行捆绑

java - 如何在 Maven 构建中包含一个随机文件以用于要在 AWS EBS 上部署的 WAR 文件?