-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
79 lines (66 loc) · 2.85 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
group 'com.earth'
version '0.1'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'war'
buildDir = "${projectDir}/out"
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven {
url 'http://maven.aliyun.com/nexus/content/groups/public'
}
}
dependencies {
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
// spring core container module
compile group: 'org.springframework', name: 'spring-core', version: '4.3.2.RELEASE'
compile group: 'org.springframework', name: 'spring-beans', version: '4.3.2.RELEASE'
compile group: 'org.springframework', name: 'spring-context', version: '4.3.2.RELEASE'
// spring web module
compile group: 'org.springframework', name: 'spring-web', version: '4.3.2.RELEASE'
compile group: 'org.springframework', name: 'spring-webmvc', version: '4.3.2.RELEASE'
// spring data access
compile group: 'org.springframework', name: 'spring-jdbc', version: '4.3.2.RELEASE'
compile group: 'org.springframework', name: 'spring-orm', version: '4.3.2.RELEASE'
//spring security
compile group: 'org.springframework.security', name:'spring-security-web', version: '4.2.3.RELEASE'
compile group:'org.springframework.security', name: 'spring-security-config', version: '4.2.3.RELEASE'
// aspectj
compile group: 'aspectj', name: 'aspectjweaver', version: '1.5.4'
// convert object to json format
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.2'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.2'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.47'
compile group: 'org.mybatis', name: 'mybatis', version: '3.4.6'
compile group: 'org.mybatis', name: 'mybatis-spring', version: '1.3.2'
// Apache Commons Library
compile group: 'org.apache.commons', name: 'commons-collections4', version: '4.1'
compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25'
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
task deploy << {
def warLib = "${libsDir}"
def appsDir = "${projectDir}/startup/data/tomcat/webapps"
println("Copy war to docker tomcat webapps")
println("From: " + warLib)
println("To: " + appsDir)
mkdir(appsDir)
copy {
from warLib
into appsDir
include "Earth-Backend-0.1.war"
rename("Earth-Backend-0.1.war", "ROOT.war")
}
}
task preBuild << {
println "User project dir: ${projectDir}"
println "User build dir: ${buildDir}"
println "User libs dir: ${libsDir}"
}
build.dependsOn(preBuild)
deploy.dependsOn(war)
deploy.dependsOn(build)