-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
189 lines (167 loc) · 6.06 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
// Targets:
// publishToMavenLocal - installs the package to MavenLocal
def exml_version = '2.2.0'
// Part 1. setting up things
subprojects {
apply plugin: 'java'
apply plugin: 'maven-publish'
repositories {
mavenCentral()
jcenter()
maven {
url "http://dl.bintray.com/yversley/com.github.yv"
}
}
task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
}
// Part 2. Special tasks
project(':exml-pipe-minimal') {
sourceSets {
main {
java {
srcDirs = ['src/main/java', 'jflex_output']
}
}
}
configurations {
lex
}
task flexSrc {
doLast {
ant.taskdef(name: 'jflex',
classname: 'jflex.anttask.JFlexTask',
classpath: configurations.lex.asPath)
ant.jflex(
file: 'jflex_src/tokens_de.jflex',
destdir: 'jflex_output')
ant.jflex(
file: 'jflex_src/tokens_en.jflex',
destdir: 'jflex_output')
}
}
task jibxBinding(dependsOn: 'build', type: JavaExec) {
main = 'org.jibx.binding.Compile'
classpath = sourceSets.main.runtimeClasspath
args = ['schemas/binding.xml']
}
compileJava.dependsOn(flexSrc)
compileJava.doLast {
tasks.jibxBinding.execute()
}
dependencies {
lex group: 'de.jflex', name: 'jflex', version: '1.6.1'
compile group: 'commons-cli', name: 'commons-cli', version: '1.2'
compile group: 'com.google.re2j', name: 're2j', version: '1.1'
compile group: 'org.jibx', name: 'jibx-run', version: '1.3.1'
compile group: 'org.jibx', name: 'jibx-bind', version: '1.3.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.4.4'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.4.4'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version:'2.4.4'
compile group: 'com.fasterxml.jackson.dataformat', name: 'jackson-dataformat-yaml', version:'2.4.4'
compile group: 'org.apache.ant', name: 'ant', version: '1.9.4'
compile group: 'de.versley', name: 'exportxml', version: '1.0.8'
compile group: 'edu.emory.mathcs.nlp', name: 'nlp4j-tokenization', version: '1.1.2'
compile group: 'edu.emory.mathcs.nlp', name: 'nlp4j-api', version: '1.1.3'
compile group: 'edu.emory.mathcs.nlp', name: 'nlp4j-english', version: '1.1.3'
compile group: 'org.apache.opennlp', name: 'opennlp-tools', 'version': '1.8.2'
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'
compile group: 'org.glassfish.jersey.core', name: 'jersey-client', version: '2.25.1'
compile group: 'org.glassfish.jersey.core', name: 'jersey-server', version: '2.25.1'
compile group: 'org.glassfish.grizzly', name: 'grizzly-http-server', version: '2.4.0'
compile group: 'org.glassfish.jersey.containers', name: 'jersey-container-grizzly2-http', version: '2.25.1'
compile group: 'org.glassfish.jersey.media', name: 'jersey-media-json-jackson', version: '2.25.1'
compile group: 'org.eclipse.collections', name: 'eclipse-collections-api', version: '8.1.0'
compile group: 'org.eclipse.collections', name: 'eclipse-collections', version: '8.1.0'
testCompile 'junit:junit:4.12'
// runtime 'com.lihaoyi:ammonite-repl_2.11.7:0.4.7'
}
artifacts {
archives javadocJar, sourcesJar
}
publishing {
publications {
maven(MavenPublication) {
groupId 'de.versley'
artifactId 'exml-pipe-minimal'
version exml_version
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
}
}
}
project(':termfinder') {
apply plugin: 'application'
dependencies {
compile project(':exml-pipe-minimal')
}
mainClassName='de.versley.terms.ExtractTerms'
}
project(':exml-pipe') {
apply plugin: 'application'
dependencies {
compile project(':exml-pipe-minimal')
compile group: 'com.github.yv', name: 'mate-parser', version: '1.30'
compile group: 'edu.berkeley.nlp', name: 'berkeleyparser', version:'r32'
compile group: 'edu.stanford.nlp', name: 'stanford-corenlp', version: '3.8.0', transitive:false
compile group: 'edu.stanford.nlp', name: 'stanford-corenlp', version: '3.8.0', classifier: 'models'
compile group: 'edu.stanford.nlp', name: 'stanford-corenlp', version: '3.8.0', classifier: 'models-german'
compile group: 'edu.emory.mathcs.nlp', name: 'nlp4j-english', version: '1.1.3'
testCompile 'junit:junit:4.12'
// runtime 'com.lihaoyi:ammonite-repl_2.11.7:0.4.7'
}
mainClassName = 'de.versley.exml.pipe.TextToEXML'
artifacts {
archives javadocJar, sourcesJar
}
publishing {
publications {
maven(MavenPublication) {
groupId 'de.versley'
artifactId 'exml-pipe'
version exml_version
from components.java
artifact sourcesJar {
classifier "sources"
}
artifact javadocJar {
classifier "javadoc"
}
}
}
}
task createAllStartScripts() {
doLast {}
}
def scripts = [ 'exml-pipe': 'de.versley.exml.pipe.TextToEXML',
'exml-server':'de.versley.exml.service.PipelineResource'
]
scripts.each() { scriptName, className ->
def t = tasks.create(name: scriptName+'StartScript', type: CreateStartScripts) {
mainClassName = className
applicationName = scriptName
outputDir = new File(project.buildDir, 'scripts')
classpath = jar.outputs.files + project.configurations.runtime
}
applicationDistribution.into("bin") {
from(t)
fileMode = 0755
}
createAllStartScripts.dependsOn(t)
}
}
task wrapper(type: Wrapper) {
gradleVersion = '3.5'
}