POM for< name>无效,传递依赖(如果有)将不可用 [英] The POM for <name> is invalid, transitive dependencies (if any) will not be available

查看:1067
本文介绍了POM for< name>无效,传递依赖(如果有)将不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题已过时且不再相关。我已经转移到Gradle进行项目构建,无法再验证答案是否有效。

我遇到了一些问题与Maven。让我先描述一下我的项目设置:

I've run into a few issues with Maven. Let me first describe my project setup:

Framework
|  -- Apache Commons Math 3.0
|  -- Bouncy Castle 1.5
|  -- etc.. (lots more)
|________
|        Client
|        | -- GUI libraries
|        | -- etc.
|
|________
         Server
         | -- Server Libraries
         | -- etc.

所以基本上我有一个包含大多数依赖项的框架,然后是两个项目,服务器和客户端包含他们自己的BUT,框架也是一个依赖(作为Framework的一个模块)。我将Framework项目安装到我的本地存储库中,我的项目都可以看到Framework-Native代码(也就是我自己的逻辑)。但是,他们似乎无法使用框架项目的任何依赖项。当我尝试构建任何一个子项目时,我得到了这个:

So essentially I have a framework that contains most dependancies and then two projects, "Server" and "Client" that contain their own BUT also the framework as a dependancy (being a module of Framework.). I installed the Framework project into my local repository and both my projects can see the Framework-Native code (aka my own logic). HOWEVER they don't seem to be able to use any of the dependancies of the Framework Project. When trying to build either of the "child"-projects I get this:

Invalid POM for de.r2soft.empires.framework:Framework:jar:Alpha-1.2, 
transitive dependencies (if any) will not be available, 
enable debug logging for more details 

我试图找到这背后的原因(或更好的解决方案),但没有发现任何解决我问题的方法。希望有人可以提供帮助。我的maven版本似乎是3.2.1(这就是-version告诉我的东西)

I've tried to find the reason behind this (or better yet a solution) but haven't found anything that fixed my issues. Hope someone here can help. My maven version seems to be 3.2.1 (that's what -version tells me anyways)

这是我的framework-pom.xml和pastebin上的client-pom.xml :

Here are my framework-pom.xml and the client-pom.xml on pastebin:

框架: http://pastebin.com/cceZECaT

客户: http://pastebin.com/1Cuxve5F

感谢帮助。

推荐答案

这样做的一个原因是当你依赖一个项目时父母pom已经过时了。如果您在不安装/部署它的情况下更新父pom,通常会发生这种情况。

One reason for this is when you rely on a project for which the parent pom is outdated. This often happens if you are updating the parent pom without installing/deploying it.

要查看是否是这种情况,只需运行 mvn依赖项:tree -X 并搜索确切的错误。它会提到它错过你知道的在父pom中的东西,而不是你所依赖的神器(例如jar版本)。

To see if this is the case, just run with mvn dependency:tree -X and search for the exact error. It will mention it misses things you know are in the parent pom, not in the artifact you depend on (e.g. a jar version).

修复非常简单:安装父pom使用 mvn install -N 并重新尝试

The fix is pretty simple: install the parent pom using mvn install -N and re-try

这篇关于POM for< name>无效,传递依赖(如果有)将不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆