forked from UMN-PeopleSoft/IBMonitorService
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
55 lines (45 loc) · 1.69 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
plugins {
id 'groovy'
id 'application'
id 'com.intershop.gradle.jaxb' version '1.0.0'
}
repositories.maven { url 'https://nexus.oit.umn.edu/content/groups/public' }
mainClassName = 'edu.umn.pssa.ibmonitorservice.IBMonitorSvc'
dependencies {
// mandatory dependencies for using Spock
testCompile 'org.spockframework:spock-core:1.0-groovy-2.4'
compile files('src/main/resources/ibmonitorconfig.jar')
compile 'com.oracle:ojdbc6:11.2.0.4'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'javax.mail', name: 'mail', version: '1.4.7'
compile group: 'org.json', name: 'json', version: '20140107'
compile group: 'pl.droidsonroids.yaml', name: 'snakeyaml', version: '1.18.2'
compile group: 'com.microsoft.sqlserver', name: 'mssql-jdbc', version: '6.2.2.jre8'
}
run {
if(System.getProperty("exec.args") != null) {
args System.getProperty("exec.args").split()
}
}
jaxb {
// generate java code from schema
javaGen {
//generates a 'project' schema file from existing java code
configType {
packageName = 'edu.umn.pssa.ibmonitorservice'
schema = file('src/main/resources/configs.xsd')
//binding = file('binding.xjb')
}
}
}
//task compileJaxb(type:JavaCompile) {
task compileJaxb(dependsOn:jaxbJavaGenConfigType, type:JavaCompile) {
source('build/generated/jaxb/java/configType')
classpath = sourceSets.main.compileClasspath
destinationDir = file('build/generated/jaxb/java/configType')
}
task jarJaxbJava(dependsOn:compileJaxb, type: Jar){
archiveName = 'ibmonitorconfig.jar'
from('build/generated/jaxb/java/configType')
destinationDir = file('src/main/resources')
}