plugins { id 'io.spring.dependency-management' version "1.0.10.RELEASE" id 'org.springframework.boot' version "2.3.5.RELEASE" apply false id "nebula.ospackage" version "8.4.1" apply false } allprojects { apply plugin: 'eclipse' group = 'eu.dariah.de.minfba' version = '4.3.6-SNAPSHOT' repositories { mavenLocal() maven { url = 'https://minfba.de.dariah.eu/nexus/repository/minfba-central/' } } ext { coreVersion = "6.5.2-SNAPSHOT" gtfVersion = "2.3.3-SNAPSHOT" processingVersion = "4.3.4-SNAPSHOT" colregModelVersion = "4.4.1-SNAPSHOT" dariahSpVersion = "2.1.7-RELEASE" jsonAssertVersion = "1.5.0" jodaTimeVersion = "2.10.10" commonsTextVersion = "1.9" commonsCompressVersion = "1.20" commonsIoVersion = "2.8.0" commonsCodecVersion = "1.15" tikaVersion = "1.25" mockitoVersion = "3.8.0" mavenRepo = 'https://minfba.de.dariah.eu/nexus/repository/minfba-central/' releasesRepo = "https://minfba.de.dariah.eu/nexus/repository/minfba-releases/" snapshotsRepo = "https://minfba.de.dariah.eu/nexus/repository/minfba-snapshots/" aptReleasesRepo = 'https://minfba.de.dariah.eu/nexus/repository/minfba-apt-releases/' aptTestingRepo = 'https://minfba.de.dariah.eu/nexus/repository/minfba-apt-testing/' yumRepo = 'https://minfba.de.dariah.eu/nexus/repository/minfba-yum/' repoUser = project.hasProperty('nexususer') ? project.getProperty('nexususer') : '?'; repoPass = project.hasProperty('nexuspass') ? project.getProperty('nexuspass') : '' // Filled dynamically by packaging tasks primaryDebFile = "" alternativeDebFile = "" rpmFile = "" aptRepo = "" } } subprojects { apply plugin: 'java' apply plugin: 'maven-publish' apply plugin: 'io.spring.dependency-management' // https://stackoverflow.com/a/53824670 configurations { implementation { exclude group: 'xml-apis', module: 'xml-apis' exclude group: 'xml-apis', module: 'xml-apis-ext' exclude group: 'xerces', module: 'xercesImpl' } } java { sourceCompatibility = JavaVersion.VERSION_11 } tasks.withType(JavaCompile) { options.encoding = 'UTF-8' } task sourcesJar(type: Jar, dependsOn: classes) { classifier = 'sources' from sourceSets.main.allSource } task javadocJar(type: Jar, dependsOn: javadoc) { classifier = 'javadoc' from javadoc.destinationDir } artifacts { archives sourcesJar archives javadocJar } dependencyManagement { imports { mavenBom(org.springframework.boot.gradle.plugin.SpringBootPlugin.BOM_COORDINATES) } } publishing { publications { maven(MavenPublication) { pom { name = 'DARIAH-DE Generic Search' url = 'https://gitlab.rz.uni-bamberg.de/dariah/search/' licenses { license { name = 'The Apache License, Version 2.0' url = 'http://www.apache.org/licenses/LICENSE-2.0.txt' } } developers { developer { id = 'tgradl' name = 'Tobias Gradl' email = 'tobias.gradl@uni-bamberg.de' } } scm { connection = 'scm:git:git://gitlab.rz.uni-bamberg.de/dariah/search.git' developerConnection = 'scm:git:git://gitlab.rz.uni-bamberg.de/dariah/search.git' url = 'https://gitlab.rz.uni-bamberg.de/dariah/search' } issueManagement { system = 'GitLab' url = 'https://gitlab.rz.uni-bamberg.de/dariah/search/issues' } } } } repositories { maven { def releasesRepoUrl = "https://minfba.de.dariah.eu/nexus/repository/minfba-releases/" def snapshotsRepoUrl = "https://minfba.de.dariah.eu/nexus/repository/minfba-snapshots/" if (version.endsWith('SNAPSHOT') || version.endsWith('RELEASE')) { credentials { username project.hasProperty('nexususer') ? project.getProperty('nexususer') : '' password project.hasProperty('nexuspass') ? project.getProperty('nexuspass') : '' } url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl } else { // Have a local test repo under buildDir to be able to test publish but only actually do publish when the version ending matches url = "$buildDir/repo/" } } } } }