Closed deepy closed 6 years ago
Try to run your build with --debug
. Somewhere in the output from Gradle, there should be a line with string Compiler arguments: which contains the exact CLI arguments for the compiler. Please attach it, and your module-info.java
descriptor, so that I could take a look at them.
This is a sample project generated by automated integration tests for module patching, which pass (/src/test/groovy/com/zyxist/chainsaw/integration/ModulePatchTestSpec.groovy
):
plugins {
id 'java'
id 'com.zyxist.chainsaw'
}
repositories {
jcenter()
}
dependencies {
patch 'com.google.code.findbugs:jsr305:1.3.9'
compile 'javax.annotation:jsr250-api:1.0'
compile 'com.google.guava:guava:23.2-jre'
}
javaModule.name = 'com.example'
javaModule.patchModules 'com.google.code.findbugs:jsr305': 'javax.annotation:jsr250-api'
Module descriptor:
module com.example {
requires jsr250.api;
requires com.google.common;
exports com.example;
}
BTW. I see that you are patching jsr250-api
with jsr305
, but your compiler complains about java.xml.ws.annotation
module. This module is included in JDK itself, and it also contains javax.annotation
package with a subset of annotations from jsr250-api.jar
.
Make sure that java.xml.ws.annotation
is not present in your module descriptor.
Having turned one of the dependencies into a module the problem went away and I can't quite reproduce it any longer :-/
Thanks for the help though!
I tried to use
But I still got all the errors