forked from lfoppiano/grobid-quantities
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
167 lines (133 loc) · 4.8 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath group: 'net.researchgate', name: 'gradle-release', version: '2.6.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.4.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.1'
}
}
apply plugin: 'maven'
apply plugin: 'com.jfrog.bintray'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'java'
apply plugin: 'war'
apply from: 'https://raw.github.com/gretty-gradle-plugin/gretty/master/pluginScripts/gretty.plugin'
group = "org.grobid"
description = """The goal of this GROBID module is to recognize in textual documents any expressions of
measurements (e.g. pressure, temperature, etc.), to parse and normalization them, and finally to convert
these measurements into SI units. We focus our work on technical and scientific articles (text, XML and PDF input)
and patents (text and XML input)."""
sourceCompatibility = 1.8
targetCompatibility = 1.8
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven { url "https://dl.bintray.com/rookies/maven" }
}
dependencies {
compile 'org.slf4j:slf4j-log4j12:1.7.25'
//Tests
testCompile 'junit:junit:4.12'
testCompile 'org.easymock:easymock:3.4'
testCompile 'org.hamcrest:hamcrest-all:1.3'
testCompile group: 'org.easymock', name: 'easymock', version: '3.4'
//GROBID
compile 'org.grobid:grobid-core:0.5.2-SNAPSHOT'
compile 'org.grobid:grobid-trainer:0.5.2-SNAPSHOT'
//Apache commons
compile 'org.apache.commons:commons-collections4:4.1'
compile 'org.apache.commons:commons-lang3:3.6'
compile 'commons-logging:commons-logging:1.2'
compile 'commons-io:commons-io:2.5'
compile 'commons-pool:commons-pool:1.6'
//Json
compile 'com.fasterxml.jackson.core:jackson-core:2.9.0'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.9.0'
compile 'com.fasterxml.jackson.core:jackson-databind:2.9.0'
// measurements
compile group: 'tec.uom', name: 'uom-se', version: '1.0.9'
compile group: 'si.uom', name: 'si-quantity', version: '0.9'
compile group: 'si.uom', name: 'si-units-java8', version: '0.9'
compile group: 'systems.uom', name: 'systems-ucum-java8', version: '0.9'
compile group: 'systems.uom', name: 'systems-quantity', version: '0.9'
//Web interface
compile 'org.glassfish.jersey.media:jersey-media-multipart:2.27'
compile 'org.glassfish.jersey.inject:jersey-hk2:2.27'
compile 'org.glassfish.jersey.containers:jersey-container-grizzly2-servlet:2.27'
compile 'org.glassfish.jersey.containers:jersey-container-servlet-core:2.27'
compile 'org.glassfish.jersey.core:jersey-client:2.27'
compile 'javax.ws.rs:javax.ws.rs-api:2.1'
compile 'javax.servlet:javax.servlet-api:3.1.0'
//Misc
compile group: 'com.googlecode.clearnlp', name: 'clearnlp', version: '1.3.1'
compile group: 'com.google.guava', name: 'guava', version: '21.0'
compile group: 'directory-naming', name: 'naming-java', version: '0.8'
compile group: 'org.jvnet', name: 'mimepull', version: '1.6'
compile group: 'net.arnx', name: 'jsonic', version: '1.3.10'
}
configurations {
compile.exclude group: "org.slf4j", module: "slf4j-jdk14"
}
configurations.all {
resolutionStrategy {
force 'xml-apis:xml-apis:1.4.01'
}
}
// Gretty configuration
gretty {
httpPort = 8060
contextPath = '/'
// servletContainer = "jetty9.4"
webInfIncludeJarPattern = ''
}
// Training configuration
def trainerTasks = [
//Training models
"train_units" : "org.grobid.trainer.UnitTrainer",
"train_quantities": "org.grobid.trainer.QuantityTrainer",
]
trainerTasks.each { taskName, mainClassName ->
tasks.create(name: taskName, type: JavaExec, group: 'training') {
main = mainClassName
classpath = sourceSets.main.runtimeClasspath
}
}
// return the default value if the property has not been specified in command line
ext.getArg = { propName, defaultVal ->
return project.hasProperty(propName) ? project.getProperty(propName) : defaultVal;
}
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
task mainJar(type: ShadowJar, group: 'test') {
zip64 true
from sourceSets.main.output
}
shadowJar {
classifier = 'onejar'
zip64 true
manifest {
attributes 'Main-Class': 'org.grobid.core.main.batch.QuantityMain'
}
}
jar {
dependsOn mainJar
enabled false
}
artifacts {
archives shadowJar
}
//tasks.withType(JavaCompile) {
// options.compilerArgs << "-Xlint:deprecation"
// options.compilerArgs << "-Xlint:unchecked"
//}
wrapper {
gradleVersion "4.2.1"
}