This repository has been archived by the owner on Jan 8, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
95 lines (79 loc) · 3.12 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
93
94
95
apply plugin: 'war'
apply plugin: 'com.bmuschko.tomcat'
apply plugin: 'com.bmuschko.tomcat-base'
apply plugin: 'idea'
apply plugin: 'org.asciidoctor.gradle.asciidoctor'
group = 'org.padewitte.kupra'
version = '0.1.0-SNAPSHOT'
description = 'A simple REST interface for MongoDB written with Apache Camel'
sourceCompatibility = JavaVersion.VERSION_1_7
repositories {
mavenCentral()
maven {
url "https://repository.apache.org/content/repositories/snapshots/"
}
}
def camelVersion = "2.14.1-SNAPSHOT"
def springVersion = "4.1.1.RELEASE"
def cglibVersion = "2.2.2"
def log4jVersion = "1.2.17"
def slf4jApiVersion = "1.6.1"
def commonsLangVersion = '2.6'
def tomcatVersion = '7.0.11'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "com.bmuschko:gradle-tomcat-plugin:2.0";
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.0';
}
}
dependencies {
//Tomcat dep
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'
}
//Compile dep
compile group: 'org.apache.camel', name: 'camel-core', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-servlet', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-spring', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-metrics', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-jackson', version: camelVersion
compile group: 'org.apache.camel', name: 'camel-mongodb', version: '2.14.0'
compile group: 'log4j', name: 'log4j', version: log4jVersion
compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jApiVersion
compile group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4jApiVersion
compile group: 'cglib', name: 'cglib', version: cglibVersion
compile group: 'commons-lang', name: 'commons-lang', version: commonsLangVersion
compile group: 'org.springframework', name: 'spring-web', version: springVersion
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.13'
compile group: 'ch.qos.logback', name: 'logback-core', version: '1.0.13'
//Test dep
testCompile group: 'org.apache.camel', name: 'camel-test', version: camelVersion
testCompile group: 'org.apache.camel', name: 'camel-http4', version: camelVersion
}
//Configuration for doc generation
asciidoctor {
outputDir = new File("src/main/webapp/documentation")
}
//Extra configuration needed to launch Tomcat before tests.
ext {
tomcatStopPort = 8081
tomcatStopKey = 'stopKey'
}
task integrationTomcatRun(type: com.bmuschko.gradle.tomcat.tasks.TomcatRun) {
stopPort = tomcatStopPort
stopKey = tomcatStopKey
daemon = true
}
task integrationTomcatStop(type: com.bmuschko.gradle.tomcat.tasks.TomcatStop) {
stopPort = tomcatStopPort
stopKey = tomcatStopKey
}
test {
dependsOn integrationTomcatRun
finalizedBy integrationTomcatStop
}