我正在尝试构建一个具有以下依赖项的项目
<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/