Reputation: 2810
I am facing strange problem during build of our project. The problem boils down probably to dependency on jaxws-rt 2.2.10. The main problem is this warning which stops transitive dependencies to propagate to our distibutable.
The POM for com.sun.xml.ws:jaxws-rt:pom:2.2.10 is invalid, transitive dependencies (if any) will not be available
The pom is probably wrong as shown in the output of mvn dependency:tree -X
or mvn dependency:tree -Dverbose
[WARNING] Failed to build parent project for com.sun.xml.ws:bundles:pom:2.2.10
[WARNING] Failed to build parent project for com.sun.xml.ws:jaxws-rt:pom:2.2.10
[WARNING] The POM for com.sun.xml.ws:jaxws-rt:pom:2.2.10 is invalid, transitive dependencies (if any) will not be available: 5 problems were encountered while building the effective model for co
m.sun.xml.ws:jaxws-rt:2.2.10
[ERROR] 'dependencies.dependency.version' for javax.xml.bind:jaxb-api:jar is missing. @
[ERROR] 'dependencies.dependency.version' for com.sun.xml.bind:jaxb-core:jar is missing. @
[ERROR] 'dependencies.dependency.version' for com.sun.xml.bind:jaxb-impl:jar is missing. @
[ERROR] 'dependencies.dependency.version' for org.jvnet.staxex:stax-ex:jar is missing. @
[ERROR] 'dependencies.dependency.version' for com.sun.xml.fastinfoset:FastInfoset:jar is missing. @
Strange thing is that the jaxws-rt pom does not define versions of aforementioned libraries. The biggest magic of all happen on our jenkins where the build proceeds unlike on any other laptop. Just adding the versions to jaxws-rt pom in local repo resolves this problem. I believe that when I find out why jenkins is able to built it without warning, then I will be able to fix the errors on laptops.
What have we investigated so far
Note: rewrite the pom is not possible in short terms as it is kind of complex already
Upvotes: 6
Views: 15091
Reputation: 1312
In my case JAVA_HOME
environment variable pointed to JRE. I set it to my JDK installation folder (On my system it is: JAVA_HOME=C:\Programme\Java\jdk-13.0.2
).
My second issue was using jaxws-maven-plugin
in version 2.3.1
. I changed it in pom.xml to 2.3.3
as following:
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.3.3</version>
</dependency>
After this changes everything was fine.
Upvotes: 5
Reputation: 1
In my case, setting the JAVA_HOME variable to the correct JDK fixed the issue, its clearly mentioned in the maven installation doc https://maven.apache.org/install.html
Upvotes: 0
Reputation: 1
To find out why the build behaves differently in jenkins and on your laptop, you can check following points:
<repository>
or <mirror>
on one side ?If there is some difference in the settings, you can check following files in your maven installations:
Note that each of this settings-file can be overriden by using -gs and -s mvn command line options respectively.
Upvotes: 0