Revision 97026c11c3a882ae6ab43c84e8eb94aea39091b1 authored by Luca Foppiano on 23 September 2017, 15:23:17 UTC, committed by Luca Foppiano on 23 September 2017, 15:23:17 UTC
Former-commit-id: ce2979f68714e121c14f99207013452c78e1d95a
1 parent 0419af7
build.gradle
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath group: 'net.researchgate', name: 'gradle-release', version: '2.4.0'
}
}
//<====== Fixing cobertura dependency
repositories {
mavenCentral()
}
allprojects {
apply plugin: 'maven'
apply plugin: 'java'
apply plugin: 'net.researchgate.release'
apply plugin: 'jacoco'
group = "org.grobid"
}
subprojects {
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
repositories {
maven {
url new File(rootProject.rootDir, "grobid-core/lib")
}
}
}
configurations {
all*.exclude group: 'org.slf4j', module: "slf4j-log4j12"
all*.exclude group: 'log4j', module: "log4j"
}
ext {
// treating them separately, these jars will be flattened into grobid-core.jar on installing,
// to avoid missing dependencies from the projects that include grobid-core (see 'jar' taskin grobid-core)
localLibs = ['crfpp-1.0.2.jar',
'language-detection-09-13-2011.jar',
'wipo-analysers-0.0.2.jar',
'imageio-pnm-1.0.jar',
'wapiti-1.5.0.jar']
}
dependencies {
// packaging local libs inside grobid-core.jar
compile fileTree(dir: new File(rootProject.rootDir, 'grobid-core/localLibs'), include: localLibs)
testCompile "junit:junit:4.12"
testCompile "org.easymock:easymock:3.4"
testCompile "org.powermock:powermock-api-easymock:1.6.6"
testCompile "org.powermock:powermock-module-junit4:1.6.6"
testCompile "xmlunit:xmlunit:1.6"
testCompile "org.hamcrest:hamcrest-all:1.3"
}
task sourceJar(type: Jar) {
description = 'A jar that contains source code'
classifier = 'sources'
from project.sourceSets.main.java
}
tasks.withType(Test){
maxParallelForks = 1
}
artifacts {
archives sourceJar
}
uploadArchives {
// if you want to enable uploading to some maven repo, add those properties to ~/.gradle/gradle.properties, e.g.:
/*
mavenRepoUserName=maven_username
mavenRepoPassword=super_secret
mavenRepoReleasesUrl=https://nexus3.example.org/repository/maven-releases/
mavenRepoSnapshotsUrl=https://nexus3.example.org/repository/maven-snapshots/
*/
def user = project.hasProperty('mavenRepoUserName') ? mavenRepoUserName : ''
def password = project.hasProperty('mavenRepoPassword') ? mavenRepoPassword : ''
def rurl = project.hasProperty('mavenRepoReleasesUrl') ? mavenRepoReleasesUrl : ''
def surl = project.hasProperty('mavenRepoSnapshotsUrl') ? mavenRepoSnapshotsUrl : ''
repositories.mavenDeployer {
repository(url: rurl) {
authentication(userName: user, password: password)
}
snapshotRepository(url: surl) {
authentication(userName: user, password: password)
}
}
}
jacocoTestReport {
reports {
html.enabled = true
xml.enabled = true
csv.enabled = false
}
}
test {
testLogging.showStandardStreams = true
}
}
project("grobid-core") {
dependencies {
compile(group: 'xml-apis', name: 'xml-apis', version: '1.4.01') {
// otherwise xml-apis 2.0.1 will come from XOM and will result in
// java.lang.ClassNotFoundException: org.w3c.dom.ElementTraversal
//TODO: sort out this problem better
force = true
}
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile "com.cybozu.labs:langdetect:1.1-20120112"
compile "com.rockymadden.stringmetric:stringmetric-core_2.10:0.27.3"
compile "commons-pool:commons-pool:1.6"
compile "commons-io:commons-io:2.5"
compile "org.apache.commons:commons-lang3:3.6"
compile "org.apache.commons:commons-collections4:4.1"
compile "commons-dbutils:commons-dbutils:1.7"
compile "org.apache.httpcomponents:httpclient:4.5.3"
compile "xerces:xercesImpl:2.11.0"
compile "com.google.guava:guava:19.0"
compile "net.arnx:jsonic:1.3.10"
compile "org.apache.pdfbox:pdfbox:1.8.9"
compile "net.sourceforge.saxon:saxon:9.1.0.8"
compile "xom:xom:1.2.5"
compile "com.fasterxml.jackson.core:jackson-core:2.9.0"
compile "com.fasterxml.jackson.core:jackson-databind:2.9.0"
compile "com.fasterxml.jackson.module:jackson-module-afterburner:2.9.0"
compile "joda-time:joda-time:2.9.9"
compile "org.apache.lucene:lucene-analyzers-common:4.5.1"
runtime group: 'org.slf4j', name: 'slf4j-jdk14', version: '1.7.25'
// testRuntime group: 'org.slf4j', name: 'slf4j-jdk14', version: '1.7.25'
}
jar {
from {
configurations.compile.collect {
it.isDirectory() ? [] : localLibs.contains(it.getName()) ? zipTree(it) : []
}
}
}
}
project("grobid-home") {
task packageGrobidHome(type: Zip) {
from('.') {
include("config/*")
include("language-detection/**")
include("lib/**")
include("pdf2xml/**")
include("models/**")
include("lexicon/**")
include("schemas/**")
exclude("models/**/*.old")
}
into("grobid-home")
}
artifacts {
archives packageGrobidHome
}
}
project("grobid-service") {
apply plugin: 'application'
mainClassName = 'org.grobid.service.main.GrobidServiceApplication'
tasks.run.workingDir = rootProject.rootDir
configurations {
all*.exclude group: 'org.slf4j', module: "slf4j-jdk14"
}
dependencies {
compile(project(':grobid-core'))
compile "io.dropwizard:dropwizard-core:1.0.2"
compile "io.dropwizard:dropwizard-assets:1.0.2"
compile "com.hubspot.dropwizard:dropwizard-guicier:1.0.0.6"
compile "io.dropwizard:dropwizard-testing:1.0.2"
compile "io.dropwizard:dropwizard-forms:1.0.2"
compile "io.dropwizard:dropwizard-client:1.0.2"
compile "io.dropwizard:dropwizard-auth:1.0.2"
compile "org.apache.pdfbox:pdfbox:1.8.9"
testCompile "io.dropwizard:dropwizard-testing:1.0.2"
}
}
project("grobid-trainer") {
dependencies {
compile(project(':grobid-core'))
compile "com.rockymadden.stringmetric:stringmetric-core_2.10:0.27.3"
}
}
//Coveralls using Jacoco
task codeCoverageReport(type: JacocoReport) {
dependsOn = subprojects.test
// Gather execution data from all subprojects
// (change this if you e.g. want to calculate unit test/integration test coverage separately)
// executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
// Add all relevant sourcesets from the subprojects
// subprojects.each {
// sourceSets it.sourceSets.main
// }
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)
executionData = files(subprojects.jacocoTestReport.executionData)
reports {
xml.enabled true
html.enabled true
html.destination "${buildDir}/reports/jacoco"
csv.enabled false
}
}
/*coveralls {
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
jacocoReportPath = "${buildDir}/reports/jacoco/jacocoRootReport/jacocoRootReport.xml"
}
tasks.coveralls {
group = 'Coverage reports'
description = 'Uploads the aggregated coverage report to Coveralls'
dependsOn codeCoverageReport
onlyIf { System.env.'CI' && !JavaVersion.current().isJava9Compatible() }
}*/
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...