获取“< name>的POM是无效的,传递依赖关系(如果有的话)将不可用“只在Eclipse中 [英] Getting "The POM for <name> is invalid, transitive dependencies (if any) will not be available" only in Eclipse

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

问题描述

我最近升级到JAXB 2.2.11,并在我的Eclipse控制台中注意到以下消息:

  10/15 / 14,11:42:46 PM GMT + 2:[INFO]创建新的启动配置
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清洁安装
10/16/14,12:09:07 AM GMT + 2:[WARN] com.sun.xml.bind的POM:jaxb-impl:jar:2.2.11无效,传递依赖(如果有)不可用:在构建com.sun.xml.bind的有效模型时遇到1个问题:jaxb-impl:2.2.11
[ERROR]'dependencyManagement.dependencies.dependency.systemPath'对于com.sun:tools:jar必须指定绝对路径,但$ {tools.jar} @

10/16/14,12:09:07 AM GMT + 2:[WARN] com.sun.xml.bind的POM:jaxb-xjc:jar:2.2.11无效,传递依赖(如果有)不可用:1个问题是encou在构建com.sun.xml.bind的有效模型的同时:jaxb-xjc:2.2.11
[ERROR]'dependencyManagement.dependencies.dependency.systemPath'for com.sun:tools:jar必须指定绝对路径但是$ {tools.jar} @

10/16/14,12:09:07 AM GMT + 2:[WARN] com.sun.xml.bind的POM:jaxb- core:jar:2.2.11无效,传递依赖(如果有)不可用:在构建com.sun.xml.bind的有效模型时遇到1个问题:jaxb-core:2.2.11
[ERROR]'dependencyManagement.dependencies.dependency.systemPath'for com.sun:tools:jar必须指定一个绝对路径,但是$ {tools.jar} @

令人困惑的是我在控制台中没有得到这个警告。有问题的 pom 似乎是正确的。我确信我在控制台和Eclipse( m2e )中使用相同的Maven安装。存储库也似乎是正确的。



有没有人会知道,可能是什么原因?


请注意,对于(几乎
相同命名的)问题,这不是重复的:





这个问题是关于Maven执行控制台和Eclipse。



解决方案

经过进一步调查,似乎我有同样的问题在这个问题:


Maven不正确地挑选JAVA_HOME


解决方案感谢@rustyx(请升级回答):


解决您使用JDK JRE从Eclipse中添加类似于 eclipse.ini -vmargs !):




  -vm 
C:\< your_path_to_jdk170> \jre\bi n \javaw.exe


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} @ 

What puzzles me is that I am not getting this warning in console. The poms 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:

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:

Maven not picking JAVA_HOME correctly

The solution thanks to @rustyx (please upvote that answer):

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

这篇关于获取“&lt; name&gt;的POM是无效的,传递依赖关系(如果有的话)将不可用“只在Eclipse中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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