-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
113 lines (95 loc) · 2.71 KB
/
build.gradle
File metadata and controls
113 lines (95 loc) · 2.71 KB
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
112
113
buildscript {
repositories {
mavenCentral()
mavenLocal()
maven { url "http://www.sparkjava.com/nexus/content/repositories/spark/" }
jcenter()
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.2.3'
}
}
version = '0.0.1'
apply plugin: 'java'
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'application'
apply plugin: 'war'
apply plugin: 'tomcat'
apply plugin: 'eclipse-wtp'
repositories {
mavenCentral()
mavenLocal()
jcenter()
maven { url "http://www.sparkjava.com/nexus/content/repositories/spark/" }
}
dependencies {
compile 'org.codehaus.groovy:groovy:2.3.2'
compile 'org.apache.commons:commons-lang3:3.1'
// spark framework and dependencies
compile 'spark:spark:0.9.9.4-SNAPSHOT'
compile 'org.slf4j:slf4j-log4j12:1.6.1'
compile 'commons-io:commons-io:1.3.2'
// other dependencies
compile 'mysql:mysql-connector-java:5.1.13'
compile 'javax.servlet:servlet-api:2.5'
compile 'javax.servlet:jstl:1.1.2'
compile 'org.apache.taglibs:taglibs-standard-jstlel:1.2.1'
// compile 'javax.servlet:jsp-api:2.0'
// compile ':standard::2.4'
//compile 'com.google.guava:guava:13.0.1'
compile 'com.squareup:dagger:0.9'
//compile 'org.apache.httpcomponents:httpclient:4.2.1'
testCompile 'junit:junit:4.10'
// tomcat plugin
def tomcatVersion = '7.0.11'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}"
tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
}
}
task createSourceDirs(description : 'Create empty source directories for all defined sourceSets') << {
sourceSets*.allSource.srcDirs.flatten().each { File sourceDirectory ->
if (!sourceDirectory.exists()) {
println "Making $sourceDirectory"
sourceDirectory.mkdirs()
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '1.2'
}
idea {
project {
jdkName = '1.7'
ipr {
withXml { provider ->
provider.node.component.find { it.@name == 'VcsDirectoryMappings' }.mapping.@vcs = 'Git'
}
}
}
module {
downloadSources = true
downloadJavadoc = true
}
}
war {
baseName = 'java-test-webapp'
}
task getHomeDir << {
println gradle.gradleHomeDir
}
tomcatRunWar {
httpPort = 8080
stopPort = 8081
//httpsPort = 8081
//enableSSL = true
//configFile = file('context.xml')
contextPath = '/'
}
tomcatRun {
httpPort = 8080
stopPort = 8081
contextPath = '/'
}