-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
138 lines (101 loc) · 2.47 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
subprojects {
apply plugin: "java" // compilation + tests unitaires
apply plugin: "war" // war construction
apply plugin: 'pmd' // checks
apply plugin: 'checkstyle' // checks
apply plugin: 'findbugs' // checks
apply plugin: "jacoco" // coverage
version = '4.0.0'
targetCompatibility = 1.7
sourceCompatibility = 1.7
// We use Maven repository
repositories {
mavenCentral()
}
// Define the dependencies
dependencies {
// For the tests only
testCompile 'junit:junit:4.5'
testCompile 'org.dbunit:dbunit:2.5.0'
// For compilation only (not deployed to Tomcat)
providedCompile 'javax.servlet:javax.servlet-api:3.0.1'
providedCompile 'com.sun.mail:javax.mail:1.5.4'
providedCompile 'postgresql:postgresql:9.1-901-1.jdbc4'
// For compilation and deployement
compile 'log4j:log4j:1.2.14'
compile 'commons-fileupload:commons-fileupload:1.2.1'
compile 'commons-io:commons-io:1.4'
compile 'com.vividsolutions:jts:1.13'
compile 'org.postgis:postgis-jdbc:1.3.3'
}
// Set the source directories for each subproject
sourceSets {
main {
java {
srcDirs 'src'
srcDirs 'custom'
}
}
test {
java {
srcDir 'test'
}
}
}
// Build the war file
// Configuration for the war task
war {
// adds a file-set to the WEB-INF dir.
webInf {
from ('config') {
include 'log4j.properties'
into ('classes/')
}
}
// copies a file to WEB-INF/web.xml
webXml = file('config/web.xml')
}
// Config for PMD
pmd {
ignoreFailures = true
}
// Config for Checkstyle
checkstyle {
ignoreFailures = true
showViolations = false
}
// Config for findbugs
findbugs {
ignoreFailures = true
}
// Config for the javadoc
javadoc {
failOnError = false
}
jacocoTestReport {
reports {
xml.enabled = true
html.enabled = true
}
}
// TODO : Créer un plugin pour JavaNCSS
//
// configurations {
// javancss
// }
// dependencies {
// compile 'javancss:javancss:30.51'
// }
// // Java NCSS
// task javancss << {
// mkdir reportsDir
// ant {
// taskdef name:'javancss', classname:'javancss.JavancssAntTask', classpath:configurations.javancss.asPath
// javancss srcdir:'src', abortOnFail:false, generateReport:true, outputfile:"$reportsDir/javancss_metrics.txt", format:'plain'
// }
// }
}
// Import the legacy ANT tasks and rename them
// ant.importBuild('build.xml') { antTargetName ->
// 'ant_' + antTargetName
// }