forked from mswatosh/was-kerberos-database
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
111 lines (96 loc) · 3.2 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
apply plugin: 'war'
apply plugin: 'ear'
apply plugin: 'liberty'
apply plugin: 'docker-compose'
group = 'com.example.liberty.kerberos'
version = '1.0-SNAPSHOT'
description = "Kerberos App for Liberty"
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
buildDir = 'liberty/build'
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.6.3'
classpath "com.avast.gradle:gradle-docker-compose-plugin:0.10.4"
}
}
repositories {
mavenCentral()
}
dependencies {
providedCompile group:'javax.servlet', name:'javax.servlet-api', version:'4.0.1'
providedCompile group: 'javax.enterprise', name: 'cdi-api', version: '2.0'
providedCompile group: 'javax.security.enterprise', name: 'javax.security.enterprise-api', version: '1.0'
compile group: 'javax.annotation', name: 'javax.annotation-api', version: '1.3'
testCompile group:'commons-httpclient', name:'commons-httpclient', version:'3.1'
testCompile group:'junit', name:'junit', version:'4.12'
libertyRuntime group:'io.openliberty', name:'openliberty-runtime', version:'[17.0.0.4,)'
runtime group: 'com.ibm.db2.jcc', name: 'db2jcc', version: 'db2jcc4'
runtime group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '8.2.1.jre8'
runtime (group: 'com.oracle.ojdbc', name: 'ojdbc8_g', version: '19.3.0.0') { transitive = false }
}
task copyDependenciesLiberty(type: Copy) {
from configurations.runtime
include 'db2jcc*'
include 'mssql*'
include 'ojdbc8_g*'
rename 'db2jcc(.*)', 'db2jcc.jar'
rename 'mssql(.*)', 'mssql.jar'
rename 'ojdbc8_g(.*)', 'ojdbc8_g.jar'
into 'liberty/build/dependencies'
}
task copyDependenciesWebSphere(type: Copy) {
from configurations.runtime
include 'db2jcc*'
include 'mssql*'
include 'ojdbc8_g*'
rename 'db2jcc(.*)', 'db2jcc.jar'
rename 'mssql(.*)', 'mssql.jar'
rename 'ojdbc8_g(.*)', 'ojdbc8_g.jar'
into 'websphere-traditional/build/dependencies'
}
ext {
appName = project.name
testServerHttpPort = 9080
testServerHttpsPort = 9443
warContext = appName
}
liberty {
server {
name = "defaultServer"
looseApplication = false
configFile = file("liberty/server.xml")
bootstrapProperties = ['default.http.port': testServerHttpPort,
'default.https.port': testServerHttpsPort,
'app.context.root': warContext]
packageLiberty {
archive = "$buildDir/${appName}.zip"
include = "usr"
}
}
}
task packageWebSphere(type: Copy) {
from "liberty/build"
into "websphere-traditional/build"
}
war {
from (sourceSets.main.output) {
archiveName = "${baseName}.${extension}"
}
}
clean.dependsOn 'libertyStop'
libertyPackage.dependsOn 'libertyStop'
libertyPackage.dependsOn 'copyDependenciesLiberty'
libertyPackage.dependsOn 'copyDependenciesWebSphere'
composeBuild.dependsOn 'oracle:prebuildOracle'
composeUp.dependsOn 'libertyPackage'
composeUp.dependsOn 'composeDown'
composeUp.dependsOn 'composeBuild'
libertyPackage.finalizedBy 'packageWebSphere'