is not allowed, transient dependencies (if any) will not be available" only in Eclipse I recently upgraded to JAXB 2.2.11 a...">

Getting "POM for <name> is not allowed, transient dependencies (if any) will not be available" only in Eclipse

I recently upgraded to JAXB 2.2.11 and noticed the following message in the Eclipse console:

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 do not receive this warning in the console. The corresponding pom also seems to be correct. I'm sure I use the same Maven installation in the console and in Eclipse ( m2e ). The repository also seems to be correct.

Does anyone know what could be causing this?

Note that this is not a duplicate for (almost identically named):

This question is about the differences between running Maven in the console and Eclipse.

+5
source share
2 answers

After further research, it turns out that I have the same problem as in this issue:

Maven does not select JAVA_HOME correctly

thanks @rustyx (please refrain from answering):

To fix the problem, you need to start Eclipse using the JRE from the JDK, adding something like this to eclipse.ini (before -vmargs !):

 -vm C:\<your_path_to_jdk170>\jre\bin\javaw.exe 
+4
source

pom for com.sun.xml.bind.jaxb-impl has com.sun.xml.bind:jaxb-parent has a parent element.

jaxb-parent pom has the following section:

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

None of the profiles are activated in your Eclipse, because of which ${tools.jar} does not matter.

One possibility may be that JAVA_HOME set incorrectly.

+4
source

Source: https://habr.com/ru/post/1204778/


All Articles