This repository was archived by the owner on Jun 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathbuild.gradle
70 lines (58 loc) · 1.73 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
apply plugin: 'war'
apply plugin: 'liberty'
group = 'net.wasdev.wlp.sample.jaxws'
version = '1.0-SNAPSHOT'
description = "Jaxws Web Sample"
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.6.3'
}
}
repositories {
mavenCentral()
}
dependencies {
libertyRuntime group: 'com.ibm.websphere.appserver.runtime', name: 'wlp-javaee7', version: '17.0.0.2'
providedCompile group: 'org.apache.cxf', name: 'cxf-rt-rs-client', version:'3.1.1'
providedCompile group: 'org.glassfish', name: 'javax.json', version:'1.0.4'
providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0'
providedCompile group: 'jstl', name: 'jstl', version:'1.2'
}
//The HandlerChain class expects the Handler files in the classes folder.
//Because of this the resources directory needs to be merged with the classes directory
//so the files are in the correct location.
sourceSets {
main {
output.resourcesDir = 'build/classes/java/main'
}
}
war {
archiveName = baseName + '.' + extension
}
liberty {
server {
packageLiberty {
archive = "$buildDir/sample.jaxws.web.zip"
include = 'usr'
}
configFile = file('src/main/liberty/config/server.xml')
bootstrapProperties = ['appLocation':war.archiveName]
apps = [war]
}
}
task printServerMessage {
doLast {
println 'The server is running at http://localhost:9131/jaxws/'
}
}
check.dependsOn 'libertyStart'
libertyStart.finalizedBy 'printServerMessage'