lex*_*ore 6 eclipse jaxb maven m2e
我最近升级到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} @
Run Code Online (Sandbox Code Playgroud)
让我感到困惑的是,我没有在控制台中收到此警告.该pom问题S还似乎是正确的.我确信我在控制台和Eclipse(m2e)中使用相同的Maven安装.存储库似乎也是正确的.
有谁碰巧知道,这可能是什么原因造成的?
请注意,这不是(几乎同名的)问题的重复:
这个问题是关于控制台中的Maven执行与Eclipse之间的差异.
在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>
Run Code Online (Sandbox Code Playgroud)
在您的Eclipse中,似乎没有激活任何配置文件,因为该配置文件${tools.jar}没有值。
一种可能是JAVA_HOME值设置不正确。
经过进一步调查后,我似乎遇到了与此问题相同的问题:
该解决方案感谢@rustyx(请给予好评这个问题的答案):
要解决此问题,您需要使用JDK中的JRE启动Eclipse,方法是将此类内容添加到
eclipse.ini(之前-vmargs!):
-vm
C:\<your_path_to_jdk170>\jre\bin\javaw.exe
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
20932 次 |
| 最近记录: |