Java 11 issue with jaxb dependencies
Just use 2.3+ version of jaxb-...
artifacts. If we check jaxb-parent-2.3.0.pom
then we see that it doesn't use <systemPath>${tools.jar}</systemPath>
anymore
You can use ./gradlew dependencies
to find the parent dependency of that jaxb dependency which caused the error.
Then upgrade that dependency to the latest.
For example to fix the error:
Errors occurred while build effective model from /home/gayanw/.gradle/caches/modules-2/files-2.1/com.sun.xml.bind/jaxb-osgi/2.2.10/c926a537af564ec047ec6308df1d0d2a03364a86/jaxb-osgi-2.2.10.pom:
'dependencyManagement.dependencies.dependency.systemPath' for com.sun:tools:jar must specify an absolute path but is ${tools.jar} in com.sun.xml.bind:jaxb-osgi:2.2.10
$ ./gradlew dependencies
| \--- io.rest-assured:xml-path:3.0.2 -> 3.3.0
| +--- org.codehaus.groovy:groovy-xml:2.4.15 -> 2.5.9 (*)
| +--- org.codehaus.groovy:groovy:2.4.15 -> 2.5.9
| +--- io.rest-assured:rest-assured-common:3.3.0 (*)
| +--- org.apache.commons:commons-lang3:3.4
| +--- org.ccil.cowan.tagsoup:tagsoup:1.2.1
| +--- javax.xml.bind:jaxb-api:2.2.12 -> 2.3.1
| | \--- javax.activation:javax.activation-api:1.2.0
| +--- com.sun.xml.bind:jaxb-osgi:2.2.10
Here in my case jaxb-osgi
is introduced by io.rest-assured:xml-path
. So upgrading that dependency should fix it.
testImplementation 'io.rest-assured:xml-path:4.2.0'