-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
99 lines (81 loc) · 2.72 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
group 'ru.gosuslugi.im.ws'
version '1.0.0-SNAPSHOT'
configurations {
jaxb
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.9.RELEASE")
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'org.springframework.boot'
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
// tag::wsdl[]
task genJaxb {
ext.sourcesDir = "${buildDir}/generated-sources/jaxb"
ext.classesDir = "${buildDir}/classes/jaxb"
ext.schema = "${projectDir}/src/main/resources/wsdl/ThirdPartyOrderService.wsdl"
outputs.dir classesDir
doLast() {
project.ant {
taskdef name: "xjc", classname: "com.sun.tools.xjc.XJCTask",
classpath: configurations.jaxb.asPath
mkdir(dir: sourcesDir)
mkdir(dir: classesDir)
xjc(destdir: sourcesDir, schema: schema) {
arg(value: "-wsdl")
produces(dir: sourcesDir, includes: "**/*.java")
}
javac(destdir: classesDir,
source: sourceCompatibility, target: targetCompatibility,
debug: true,
debugLevel: "lines,vars,source",
includeantruntime: false,
classpath: configurations.jaxb.asPath) {
src(path: sourcesDir)
include(name: "**/*.java")
include(name: "*.java")
}
copy(todir: classesDir) {
fileset(dir: sourcesDir, erroronmissingdir: false) {
exclude(name: "**/*.java")
}
}
}
}
}
// end::wsdl[]
dependencies {
compile("javax.servlet:javax.servlet-api:3.1.0")
compile("org.apache.commons:commons-lang3:3.7")
compile("commons-logging:commons-logging:1.1.1")
compile("xalan:xalan:2.7.0")
compile("org.springframework.boot:spring-boot-starter")
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.ws:spring-ws-core")
compile("org.springframework.ws:spring-ws-support")
// Signature dependencies
compile("org.bouncycastle:bcprov-jdk15on:1.50")
compile("org.bouncycastle:bcpkix-jdk15on:1.50")
compile("org.apache.santuario:xmlsec:1.5.8")
compile('org.apache.ws.security:wss4j:1.6.6') {
exclude group: 'org.opensaml', module: 'opensaml'
}
compile(fileTree("${projectDir}/libs"))
compile(files(genJaxb.classesDir).builtBy(genJaxb))
jaxb "com.sun.xml.bind:jaxb-xjc:2.1.7"
testCompile("junit:junit:4.12")
testCompile("org.springframework.boot:spring-boot-starter-test")
}
jar {
from genJaxb.classesDir
}