-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle
92 lines (73 loc) · 2.39 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
92
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'war'
apply plugin: 'jetty'
//version = '0.1-SNAPSHOT'
eclipseWtp { variables['PROJECT_DIR'] = projectDir.absolutePath }
compileJava {
options.encoding='UTF-8'
}
compileTestJava {
options.encoding='UTF-8'
}
configurations {
jetty
tomcat
provided
grinder
}
eclipseClasspath {
plusConfigurations += configurations.provided
}
sourceSets {
main {
compileClasspath += configurations.provided
}
}
repositories {
mavenCentral()
mavenRepo urls: 'http://repository.jboss.org/nexus/content/groups/public/'
mavenRepo urls: 'http://download.java.net/maven/2'
}
dependencies {
tomcat ('org.apache.tomcat:tomcat-catalina:7.0.2')
tomcat 'org.apache.tomcat.embed:tomcat-embed-core:7.0.2'
tomcat ('org.apache.tomcat:tomcat-jasper:7.0.2') {
exclude group:'org.eclipse.jdt', name:'ecj',version:'3.6'
}
tomcat group:'org.eclipse.jdt.core.compiler', name:'ecj',version:'3.5.1'
jetty 'org.mortbay.jetty:jetty-hightide:8.0.0.M1'
jetty 'org.slf4j:slf4j-jdk14:1.6.1'
// to generate the eclipse classpath, you need it to be compile group
provided 'javax:javaee-web-api:6.0'
//compile 'javax:javaee-web-api:6.0'
compile group: 'log4j', name: 'log4j', version: '1.2.+'
compile 'commons-httpclient:commons-httpclient:3.1'
compile 'org.apache.httpcomponents:httpcore:4.0.1'
compile 'org.apache.httpcomponents:httpcore-nio:4.0.1'
compile group: 'org.hibernate', name: 'hibernate-core', version: '3.6.0.Beta2'
testCompile group: 'junit', name: 'junit', version: '4.+'
testCompile group: 'org.mockito', name: 'mockito-all', version: '1.8.5'
testCompile group: 'org.hsqldb', name: 'hsqldb', version: '2.0.0'
lib = "$projectDir/lib"
grinder files(fileTree(dir: lib as File, includes: ['*.jar']))
}
task runJetty8(type: JavaExec, dependsOn: build) {
classpath configurations.jetty
// classpath configurations.runtime
args '--ini=etc/start.ini'
// jvmArgs '-Xmx800M','-Xss100K'
main = 'org.eclipse.jetty.start.Main'
}
task runTomcat7(type: JavaExec, dependsOn: build) {
classpath configurations.tomcat
// classpath configurations.runtime
// jvmArgs '-Xmx1500M', '-XX:+AggressiveOpts' // ,'-Xss100K'
main = 'org.apache.catalina.startup.Bootstrap'
}
task runGrinder(type: JavaExec, dependsOn: build) {
classpath configurations.grinder
classpath configurations.runtime
args 'grinder/grinder.properties'
main = 'net.grinder.Grinder'
}