我最近升级到JAXB 2.2.11并在Eclipse控制台中注意到以下消息:
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中使用相同的Maven安装(m2e
)。存储库似乎也是正确的。
有没有人碰巧知道,是什么原因造成这种情况?
请注意,这几乎不是重复的 同名的)问题:
这个问题是关于控制台和Eclipse中Maven执行之间的区别。
答案 0 :(得分:5)
经过进一步调查后,我似乎遇到了与此问题相同的问题:
solution感谢@rustyx(请提出回答):
要解决此问题,您需要使用JDK中的JRE启动Eclipse,方法是将此类内容添加到
eclipse.ini
(-vmargs
之前!):
-vm
C:\<your_path_to_jdk170>\jre\bin\javaw.exe
答案 1 :(得分:4)
pom
com.sun.xml.bind.jaxb-impl
com.sun.xml.bind:jaxb-parent
的父级jaxb-parent pom
。
<profile>
<id>default-tools.jar</id>
<activation>
<file>
<exists>${java.home}/../lib/tools.jar</exists>
</file>
</activation>
<properties>
<tools.jar>${java.home}/../lib/tools.jar</tools.jar>
</properties>
</profile>
<profile>
<id>default-tools.jar-mac</id>
<activation>
<file>
<exists>${java.home}/../Classes/classes.jar</exists>
</file>
</activation>
<properties>
<tools.jar>${java.home}/../Classes/classes.jar</tools.jar>
</properties>
</profile>
包含以下部分:
${tools.jar}
在Eclipse中,由于JAVA_HOME
没有值,因此似乎都没有激活配置文件。
一种可能是{{1}}值设置不正确。
答案 2 :(得分:0)