获取"名称>的POM无效,传递依赖(如果有)将不可用"仅在 Eclipse 中 [英] Getting "The POM for <name> is invalid, transitive dependencies (if any) will not be available" only in Eclipse
问题描述
我最近升级到 JAXB 2.2.11 并在我的 Eclipse 控制台中注意到以下消息:
I have recently upgraded to JAXB 2.2.11 and noticed in my Eclipse console the following message:
10/15/14, 11:42:46 PM GMT+2: [INFO] Creating new launch configuration
10/15/14, 11:42:58 PM GMT+2: [INFO] C:\Projects\workspaces\mj2p\maven-jaxb2-plugin-project\tests\JAXB-1044
10/15/14, 11:42:58 PM GMT+2: [INFO] mvn -B -X -e clean install
10/16/14, 12:09:07 AM GMT+2: [WARN] The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for com.sun.xml.bind:jaxb-impl:2.2.11
[ERROR] 'dependencyManagement.dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${tools.jar} @
10/16/14, 12:09:07 AM GMT+2: [WARN] The POM for com.sun.xml.bind:jaxb-xjc:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for com.sun.xml.bind:jaxb-xjc:2.2.11
[ERROR] 'dependencyManagement.dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${tools.jar} @
10/16/14, 12:09:07 AM GMT+2: [WARN] The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for com.sun.xml.bind:jaxb-core:2.2.11
[ERROR] 'dependencyManagement.dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${tools.jar} @
令我困惑的是,我没有在控制台中收到此警告.有问题的 pom
似乎也是正确的.我确定我在控制台和 Eclipse (m2e
) 中使用相同的 Maven 安装.存储库似乎也是正确的.
What puzzles me is that I am not getting this warning in console. The pom
s in question also seems to be correct. I am sure I am using the same Maven installation in the console and in Eclipse (m2e
). The repository also seems to be correct.
有人碰巧知道这是什么原因造成的吗?
Does anyone happen to know, what could be causing this?
请注意,这不是(几乎同名)问题:
Please note that this is not a duplicate for (almost identically-named) question:
这个问题是关于 Maven 在控制台和 Eclipse 中执行之间的差异.
This question is about the differences between Maven execution in the console and from the Eclipse.
推荐答案
经过进一步调查,我似乎遇到了与此问题相同的问题:
After further investigation it appears that I have the same problem as in this question:
感谢@rustyx 的解决方案(请对该答案投赞成票):
The solution thanks to @rustyx (please upvote that answer):
要解决此问题,您需要使用 JDK 中的 JRE 启动 Eclipse,方法是在 eclipse.ini
中添加类似内容(在 -vmargs
之前!):>
To fix the issue you need to start Eclipse using the JRE from the JDK by adding something like this to
eclipse.ini
(before-vmargs
!):
-vm
C:\<your_path_to_jdk170>\jre\bin\javaw.exe
这篇关于获取"名称>的POM无效,传递依赖(如果有)将不可用"仅在 Eclipse 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!