Skip to content

Commit 12d22b4

Browse files
chore: update XJC
using 'com.github.bjornvester.xjc'
1 parent d7e4858 commit 12d22b4

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

build.gradle

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ plugins {
66
id 'application'
77
id 'org.openjfx.javafxplugin' version '0.1.0'
88
id 'org.beryx.runtime' version '1.13.1'
9-
id 'org.unbroken-dome.xjc' version '2.0.0'
9+
// id 'org.unbroken-dome.xjc' version '2.0.0'
10+
id 'com.github.bjornvester.xjc' version "1.8.1" // https://github.com/bjornvester/xjc-gradle-plugin
1011
}
1112

1213
dependencies {
@@ -28,9 +29,11 @@ dependencies {
2829
// implementation 'com.lowagie:itext:2.1.7'
2930

3031
// JAXB and XML Diff
31-
implementation 'org.xmlunit:xmlunit-core:2.8.1'
32-
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:2.3.3'
33-
implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.3'
32+
// Note: XML Unit 2.8+ contains all necessary JAXB/Jakarta dependencies
33+
// see https://github.com/xmlunit/xmlunit/releases/tag/v2.8.0
34+
implementation 'org.xmlunit:xmlunit-core:2.9.1'
35+
implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2' // javax.xml.bind.annotation
36+
implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.5'
3437
implementation 'org.junit.jupiter:junit-jupiter:5.10.2'
3538

3639
// test dependencies
@@ -54,9 +57,9 @@ test {
5457

5558
// org.openjfx.javafxplugin 0.1.0+ issues
5659
// see https://github.com/openjfx/javafx-gradle-plugin/pull/154
57-
5860
// e.g., "copy" configuration from the runtimeClasspath over to xjcCatalogResolution
59-
configurations.xjcCatalogResolution {
61+
System.out.println("XXXXXXX: " + configurations);
62+
/*configurations.xjcCatalogResolution {
6063
def rtCpAttributes = configurations.runtimeClasspath.attributes
6164
rtCpAttributes.keySet().each { key ->
6265
attributes.attribute(key, rtCpAttributes.getAttribute(key))
@@ -67,8 +70,7 @@ configurations.testXjcCatalogResolution {
6770
rtCpAttributes.keySet().each { key ->
6871
attributes.attribute(key, rtCpAttributes.getAttribute(key))
6972
}
70-
}
71-
73+
}*/
7274
// e.g., configure manually
7375
/* configurations.xjcCatalogResolution {
7476
attributes {
@@ -84,7 +86,7 @@ javafx {
8486
}
8587

8688
xjc {
87-
// srcDirName = 'src/main/resources'
89+
xsdDir.set(layout.projectDirectory.dir("src/main/schema")) // by default src/main/resource
8890
}
8991

9092
version = '24.04.24'

src/main/java/com/example/hellofx/HelloFX.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@
3232
import org.xmlunit.diff.ComparisonControllers;
3333
import org.xmlunit.diff.Diff;
3434

35-
import javax.xml.bind.JAXBContext;
36-
import javax.xml.bind.JAXBException;
37-
import javax.xml.bind.Marshaller;
38-
import javax.xml.bind.Unmarshaller;
35+
import jakarta.xml.bind.JAXBContext;
36+
import jakarta.xml.bind.JAXBException;
37+
import jakarta.xml.bind.Marshaller;
38+
import jakarta.xml.bind.Unmarshaller;
3939
import javax.xml.parsers.DocumentBuilder;
4040
import javax.xml.parsers.DocumentBuilderFactory;
4141
import javax.xml.parsers.ParserConfigurationException;

0 commit comments

Comments
 (0)