-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
91 lines (74 loc) · 3.29 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
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: 'jetty'
apply plugin: 'maven'
apply plugin: 'war'
ext {
springVersion = "3.2.2.RELEASE"
slf4jVersion = "1.6.1"
}
repositories {
// flatDir { dirs "lib" }
mavenLocal()
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.8.2'
testCompile group: 'com.jayway.jsonpath', name: 'json-path', version: '0.5.3'
compile group: 'com.google.guava', name: 'guava', version: '12.0'
compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.12'
compile group: 'cglib', name: 'cglib', version: '2.2'
compile group: 'javax.validation', name: 'validation-api', version: '1.0.0.GA'
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: slf4jVersion
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4jVersion
// Servlet
compile group: 'javax.servlet', name: 'servlet-api', version: '2.5'
compile group: 'javax.servlet.jsp', name: 'jsp-api', version: '2.1'
compile group: 'javax.servlet', name: 'jstl', version: '1.2'
// BoneCP:
compile group: 'com.jolbox', name: 'bonecp', version: '0.7.1.RELEASE'
// MyBatis:
compile group: 'org.mybatis', name: 'mybatis', version: '3.2.3'
compile group: 'org.mybatis', name: 'mybatis-spring', version: '1.2.1'
compile group: 'org.mybatis.generator', name: 'mybatis-generator-core', version: '1.3.2'
// Spring:
compile group: 'org.springframework', name: 'spring-aop', version: springVersion
compile group: 'org.springframework', name: 'spring-core', version: springVersion
compile group: 'org.springframework', name: 'spring-beans', version: springVersion
compile group: 'org.springframework', name: 'spring-tx', version: springVersion
compile group: 'org.springframework', name: 'spring-webmvc', version: springVersion
compile group: 'org.springframework', name: 'spring-jdbc', version: springVersion
compile group: 'org.springframework', name: 'spring-test', version: springVersion
compile group: 'org.springframework', name: 'spring-context', version: springVersion
compile group: 'org.springframework', name: 'spring-context-support', version: springVersion
compile group: 'org.hibernate', name: 'hibernate-validator', version: '4.2.0.Final'
// fileTree(dir: "${rootProject.projectDir}/lib", include: '*.jar')
}
task "create-dirs" << {
sourceSets*.java.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs() }
}
tasks.eclipse.dependsOn "create-dirs"
task libs(type: Sync) {
from configurations.runtime
into "$buildDir/libs"
}
task mybatis << {
ant.taskdef(name: 'genfiles', classname: 'org.mybatis.generator.ant.GeneratorAntTask' ){
classpath {
fileset(dir: "$buildDir/libs", includes: '*.jar')
}
}
ant.genfiles(overwrite: 'true', configfile : "$projectDir/src/main/resources/mybatis/ant_mybatisConfig.xml" , verbose: 'false')
}
tasks.mybatis.dependsOn "libs"
[jettyRun, jettyRunWar]*.with {
jettyConfig = new File('src/main/resources/jetty.xml')
additionalRuntimeJars = sourceSets.main.runtimeClasspath
}
eclipse.jdt.file {
withProperties { properties ->
properties.put('org.eclipse.jdt.core.formatter.lineSplit', '120')
}
}