File tree Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Expand file tree Collapse file tree 1 file changed +16
-8
lines changed Original file line number Diff line number Diff line change 1
1
plugins {
2
- id " org.unbroken-dome. xjc"
2
+ id " com.github.bjornvester. xjc" version " 1.8.2 "
3
3
}
4
4
5
5
description = " Spring Object/XML Marshalling"
6
6
7
7
xjc {
8
- xjcVersion = ' 3.0'
9
- }
10
-
11
- sourceSets {
12
- test {
13
- xjcTargetPackage = ' org.springframework.oxm.jaxb.test'
14
- }
8
+ xsdDir. set(layout. projectDirectory. dir(" src/test/schema" ))
9
+ defaultPackage. set(' org.springframework.oxm.jaxb.test' )
15
10
}
16
11
17
12
dependencies {
@@ -31,3 +26,16 @@ dependencies {
31
26
testRuntimeOnly(" com.sun.xml.bind:jaxb-core" )
32
27
testRuntimeOnly(" com.sun.xml.bind:jaxb-impl" )
33
28
}
29
+
30
+ tasks. named(" xjc" ). configure { xjc ->
31
+ // XJC plugin only works against main sources
32
+ def javaSrcDirs = sourceSets. main. java. srcDirs
33
+ javaSrcDirs. remove(file(xjc. outputJavaDir))
34
+ sourceSets. main. java. srcDirs = javaSrcDirs
35
+ def resourcesSrcDirs = sourceSets. main. resources. srcDirs
36
+ resourcesSrcDirs. remove(file(xjc. outputResourcesDir))
37
+ sourceSets. main. resources. srcDirs = resourcesSrcDirs
38
+
39
+ sourceSets. test. java. srcDir(xjc. outputJavaDir)
40
+ sourceSets. test. resources. srcDir(xjc. outputResourcesDir)
41
+ }
You can’t perform that action at this time.
0 commit comments