-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
165 lines (147 loc) · 4.28 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
configurations {
jaxws
}
buildscript {
ext {
artifactId = 'merchant-gateway'
artifactGroup = 'ru.all-recipes'
artifactVersion = '0.1.0-SNAPSHOT'
springBootVersion = '2.0.0.RELEASE'
}
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:2.0.0.RELEASE"
classpath "io.franzbecker:gradle-lombok:1.8"
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'io.franzbecker.gradle-lombok'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'checkstyle'
apply plugin: 'findbugs'
apply plugin: 'pmd'
apply plugin: 'war'
repositories {
mavenCentral()
mavenLocal()
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
task wsimport {
ext.destDir = file("${buildDir}/generated-sources/jaxb")
ext.classesDir = sourceSets.main.output.classesDir
doLast {
ant {
sourceSets.main.output.classesDir.mkdirs()
destDir.mkdirs()
taskdef(name: 'wsimport',
classname: 'com.sun.tools.ws.ant.WsImport',
classpath: configurations.jaxws.asPath
)
wsimport(keep: true,
destdir: classesDir,
sourcedestdir: destDir,
extension: "true",
verbose: "false",
quiet: "false",
xnocompile: "true",
wsdl: 'https://web.rbsuat.com/ab/webservices/merchant-ws?wsdl') {
xjcarg(value: "-XautoNameResolution")
}
}
}
}
dependencies {
compile "org.springframework.boot:spring-boot-starter"
compile "org.springframework:spring-jdbc"
compile "org.springframework.boot:spring-boot-starter-web"
compile "org.springframework.boot:spring-boot-starter-data-jpa"
compile "org.springframework.boot:spring-boot-starter-log4j2"
compile "org.springframework.ws:spring-ws-core"
compile "org.postgresql:postgresql:42.1.4"
compile "io.springfox:springfox-swagger2:2.6.1"
compile "io.springfox:springfox-swagger-ui:2.6.1"
compile(files(wsimport.classesDir).builtBy(wsimport))
compile('org.apache.tomcat.embed:tomcat-embed-jasper' ,'javax.servlet:jstl')
providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
//jaxb "com.sun.xml.bind:jaxb-xjc:2.1.7"
jaxws "com.sun.xml.ws:jaxws-tools:2.1.4"
testCompile "org.springframework.boot:spring-boot-starter-test"
}
compileJava {
dependsOn wsimport
source wsimport.destDir
}
bootWar {
baseName = "${artifactId}"
version = "${artifactVersion}"
from wsimport.destDir
}
configurations {
compile.exclude module: 'spring-boot-starter-logging'
}
def webappDir = "$projectDir/src/main/webapp"
sourceSets {
main {
resources {
srcDirs = ["$webappDir/dist", "$projectDir/src/main/resources"]
}
}
}
task afterEclipseImport {
dependsOn wsimport
}
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}
checkstyle {
configFile = rootProject.file('checkstyle/google_checks.xml')
ignoreFailures = false
toolVersion = '8.8'
}
pmd {
ignoreFailures = false
rulePriority = 2
toolVersion = '5.5.3'
ruleSets = [
'java-basic',
'java-braces',
'java-clone',
'java-codesize',
'java-comments',
'java-controversial',
'java-coupling',
'java-design',
'java-empty',
'java-finalizers',
'java-imports',
'java-j2ee',
'java-javabeans',
'java-junit',
'java-logging-jakarta-commons',
'java-logging-java',
'java-migrating',
'java-naming',
'java-optimizations',
'java-strictexception',
'java-strings',
'java-sunsecure',
'java-typeresolution',
'java-unnecessary',
'java-unusedcode'
]
}
findbugs {
ignoreFailures = false
sourceSets = [sourceSets.main]
}