Stackoverflow when using groups without defining xjcVersion
egaga opened this issue · 1 comments
egaga commented
If xjcVersion.set("2.3.3") (or 3.0.0) is omitted when using groups to define multiple schema generations, the gradle build fails mysteriously with:
java.lang.StackOverflowError
at org.gradle.api.internal.provider.AbstractProperty.getProducer(AbstractProperty.java:178)
at org.gradle.api.internal.provider.AbstractProperty.getProducer(AbstractProperty.java:178)
at org.gradle.api.internal.provider.AbstractProperty.getProducer(AbstractProperty.java:178)
(and so on...)
This should not be the case as the documentation says: "It has been tested with XJC version 2.3.3 and 3.0.0 (from Jakarta EE). Defaults to 2.3.3."
Example something like this:
groups {
markGenerated.set(true)
register("MyXJC") {
xsdDir.set(layout.projectDirectory.dir("src/main/resources/jaxb"))
defaultPackage.set("com.something.foobar")
xsdFiles = project.files(xsdDir.file("Something.xsd"))
outputJavaDir.set(layout.projectDirectory.dir("src/generated/java/xjc/"))
}
}
Tested with xjc-gradle-plugin 1.6.0.
As a personal anectode because of this I tried to create alternative way to configure multiple tasks which have independent xjc definitions but that failed as it seems that the last configuration of xjc was solely picked.
evantill commented
could we make a PR for this ?