-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
72 lines (59 loc) · 1.55 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
apply plugin: 'war'
apply plugin: 'liberty'
group = 'net.wasdev.wlp.sample.javaee7'
version = '1.0-SNAPSHOT'
description = "Java EE 7 Sample JTA"
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
configurations {
derby {
transitive = false
}
}
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.6.3'
}
}
repositories {
mavenCentral()
}
dependencies {
compile group: 'javax.json', name: 'javax.json-api', version:'1.0'
providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version:'3.1.0'
providedCompile group: 'javax.transaction', name: 'javax.transaction-api', version:'1.2-b03'
providedCompile group: 'javax.enterprise', name: 'cdi-api', version:'1.2'
derby group: 'org.apache.derby', name: 'derby', version: '10.13.1.1'
}
liberty {
server {
configFile = file('src/main/wlp/server.xml')
bootstrapProperties = ['appLocation':war.archiveName]
apps = [war]
}
}
task copyDerby {
doLast {
copy {
from configurations.derby
into "$buildDir/wlp/usr/shared/resources/derby/"
include '*.jar'
rename "derby-10.13.1.1.jar", 'derby.jar'
}
}
}
task printServerMessage {
doLast {
println 'The server is running at http://localhost:9080/sample.javaee7.jta'
}
}
check.dependsOn 'libertyStart'
libertyCreate.finalizedBy 'copyDerby'
libertyStart.finalizedBy 'printServerMessage'