-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
74 lines (59 loc) · 2.23 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
group 'cn.libra'
version '1.0-SNAPSHOT'
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-tomcat-plugin:2.2.5'
}
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'idea'
apply plugin:'jetty'
//apply plugin: 'com.bmuschko.tomcat'
sourceCompatibility = 1.5
repositories {
mavenLocal()
mavenCentral()
}
[compileJava,compileTestJava,javadoc]*.options*.encoding = "UTF-8"
dependencies {
def springVersion = "4.3.5.RELEASE"
compile("org.springframework:spring-webmvc:$springVersion") //MVC
compile("org.springframework:spring-test:$springVersion") //测试
compile("org.springframework:spring-tx:$springVersion") //事物
compile("org.springframework:spring-jdbc:$springVersion") //JDBC
compile group: 'org.springframework.security.oauth', name: 'spring-security-oauth2', version: '2.0.12.RELEASE' //OAUTH2
compile group: 'commons-dbcp', name: 'commons-dbcp', version: '1.4' //DHCP连接池
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
compile "javax.inject:javax.inject:1"
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.5'
compile group: 'org.mybatis', name: 'mybatis-spring', version: '1.3.1'
compile group: 'log4j', name: 'log4j', version: '1.2.17'
compile group: 'org.mybatis.generator', name: 'mybatis-generator-core', version: '1.3.5'
compile group: 'org.mybatis', name: 'mybatis', version: '3.4.2'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.40'
testCompile group: 'junit', name: 'junit', version: '4.12'
def tomcatVersion = '8.5.9'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
//tomcatRun{
// contextPath= project.name
// URIEncoding= 'UTF-8'
// reloadable = 'true'
//}
jettyRun{
webAppSourceDirectory file("$projectDir/src/main/webapp")
httpPort 8081
contextPath project.name
scanIntervalSeconds 0
reload "automatic"
}