Commit dc206e1a authored by Gradl, Tobias's avatar Gradl, Tobias

Minor finalizing steps for Gradle migration

parent c80902a9
Pipeline #13395 passed with stage
in 3 minutes and 9 seconds
buildscript {
repositories {
//maven { url 'https://repo.spring.io/plugins-snapshot' }
maven { url "https://plugins.gradle.org/m2/" }
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
//classpath 'io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE'
classpath "com.netflix.nebula:gradle-ospackage-plugin:8.0.3"
//classpath 'io.spring.gradle:dependency-management-plugin'
classpath 'com.netflix.nebula:gradle-ospackage-plugin'
}
}
plugins {
//id 'java'
id 'war'
//id "io.spring.dependency-management" version "1.0.6.RELEASE"
//id 'io.spring.dependency-management' version '1.0.8.RELEASE'
id 'maven-publish'
id "org.gretty" version "3.0.1"
id 'nebula.ospackage' version '8.0.3'
}
apply plugin: "nebula.ospackage"
group = 'de.unibamberg.minf'
version = '3.6.0'
version = '3.6.0-SNAPSHOT'
description = 'DARIAH-DE Data Modeling Environment'
def mavenRepo = 'https://minfba.de.dariah.eu/nexus/repository/minfba-central/'
def releasesRepo = "https://minfba.de.dariah.eu/nexus/repository/minfba-releases/"
def snapshotsRepo = "https://minfba.de.dariah.eu/nexus/repository/minfba-snapshots/"
def aptRepo = 'https://minfba.de.dariah.eu/nexus/repository/minfba-apt/'
def yumRepo = 'https://minfba.de.dariah.eu/nexus/repository/minfba-yum/'
def repoUser = project.hasProperty('nexususer') ? project.getProperty('nexususer') : '?';
def repoPass = project.hasProperty('nexuspass') ? project.getProperty('nexuspass') : ''
repositories {
mavenLocal()
maven {
url = 'https://minfba.de.dariah.eu/nexus/repository/minfba-central/'
url = mavenRepo
}
}
......@@ -100,6 +106,17 @@ task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
tasks.withType(Deb) {
dependsOn(classes)
}
......@@ -109,7 +126,6 @@ tasks.withType(Rpm) {
}
ospackage {
//release '1'
os = LINUX
arch = 'noarch'
packageName "dariah-$project.name"
......@@ -149,38 +165,12 @@ ospackage {
}
}
/*task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}*/
artifacts {
archives sourcesJar
//archives javadocJar
}
task publishDebPackage {
def repo = "https://minfba.de.dariah.eu/nexus/repository/minfba-apt/"
def user = project.hasProperty('nexususer') ? project.getProperty('nexususer') : '?';
def password = project.hasProperty('nexuspass') ? project.getProperty('nexuspass') : ''
def debPackage = "$buildDir/distributions/java/main"
println "Publishing Debian package for $project.name-$project.version as user $user";
exec {
executable "curl"
//args "-u \"$user:$password\"", "-H \"Content-Type: multipart/form-data\"", "--data-binary 12", "$repo";
args "-u \"$user:$password\"", "www.google.de";
}
}
publishing {
publications {
maven(MavenPublication) {
from(components.web)
//artifact(sourcesJar) {}
//artifact(javadocJar) {}
artifact(sourcesJar) {}
artifact(javadocJar) {}
pom {
name = 'DARIAH-DE Data Modeling Environment'
url = 'https://gitlab.rz.uni-bamberg.de/dariah/dme'
......@@ -210,20 +200,52 @@ publishing {
}
}
repositories {
maven {
def releasesRepoUrl = "https://minfba.de.dariah.eu/nexus/repository/minfba-releases/"
def snapshotsRepoUrl = "https://minfba.de.dariah.eu/nexus/repository/minfba-snapshots/"
maven {
if (version.endsWith('SNAPSHOT') || version.endsWith('RELEASE')) {
credentials {
username project.hasProperty('nexususer') ? project.getProperty('nexususer') : ''
password project.hasProperty('nexuspass') ? project.getProperty('nexuspass') : ''
username repoUser
password repoPass
}
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
url = version.endsWith('SNAPSHOT') ? snapshotsRepo : releasesRepo
} 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/"
}
}
}
}
\ No newline at end of file
}
task publishDebPackage {
dependsOn buildDeb
def distroPath = "$buildDir/distributions/"
def debPackage = "dariah-${project.name}_${project.version}_noarch.deb"
doLast {
if (version.endsWith('SNAPSHOT') || version.endsWith('RELEASE')) {
println "Publishing Debian package $debPackage as user $repoUser";
exec {
executable "curl"
args "-f", "-u", "$repoUser:$repoPass", "-H", "Content-Type: multipart/form-data", "--data-binary", "@$distroPath$debPackage", "$aptRepo";
}
}
}
}
task publishRpmPackage {
dependsOn buildRpm
def distroPath = "$buildDir/distributions/"
def rpmPackage = "dariah-${project.name}-${project.version}.noarch.rpm"
doLast {
if (version.endsWith('SNAPSHOT') || version.endsWith('RELEASE')) {
println "Publishing Rpm package $rpmPackage as user $repoUser";
exec {
executable "curl"
args "-f", "-u", "$repoUser:$repoPass", "--upload-file", "$distroPath$rpmPackage", "$yumRepo/dariah/${project.name}/${project.version}/$rpmPackage";
}
}
}
}
publish.finalizedBy publishDebPackage
publish.finalizedBy publishRpmPackage
\ No newline at end of file
This diff is collapsed.
......@@ -24,9 +24,9 @@ import de.unibamberg.minf.core.web.pojo.ModelActionPojo;
* @author tobias
*
* Requires web.xml adaption:
* <error-page>
* <location>/errors</location>
* </error-page>
* &lt;error-page&gt;
* &lt;location&gt;/errors&lt;/location&gt;
* &lt;/error-page&gt;
*
*/
@Controller
......
......@@ -15,6 +15,8 @@ public interface ReferenceDao extends BaseDao<Reference> {
* the values contain the removable IDs.
*
* @param referenceMap - A map with class names as keys and reference arrays as values
* @param userId - Identifier of the user
* @param sessionId - Identifier of the user's current session
* @throws IllegalArgumentException Thrown if any of the specified references has an invalid ID
* @throws ClassNotFoundException Thrown if a key specifies a class name that cannot be found by the current classloader
*/
......
......@@ -16,8 +16,7 @@ import de.unibamberg.minf.processing.model.base.Resource;
/**
* Persisted session
*
* @todo sampleInput, sampleOutput and selectedValueMap are specific for schema modeling; validate specialize for mappings
*
*
* @author tobias
*/
......
......@@ -72,6 +72,7 @@ public abstract class BaseReferenceServiceImpl extends BaseServiceImpl implement
*
* @param parentReference - The reference to which the new subreference is added
* @param child - The entity for which the subreference is created
* @return added child reference
*/
protected static Reference addChildReference(Reference parentReference, Identifiable child) {
Assert.notNull(parentReference);
......@@ -94,8 +95,9 @@ public abstract class BaseReferenceServiceImpl extends BaseServiceImpl implement
* Removes the specified reference from a loaded tree, saves the tree and deletes all entities referenced by
* any of the references in the removed reference subtree (not the element with the removeId, however).
*
* @param rootReferenceId - The ID of the root reference
* @param schemaId - The ID of the root reference
* @param removeId - The ID of the reference that needs to be removed
* @param auth - AuthPojo
* @throws IllegalArgumentException Thrown if any of the references in the deleted subtree has an invalid ID
* @throws ClassNotFoundException Thrown if a class name is specified that cannot be found by the current classloader
*/
......@@ -124,7 +126,8 @@ public abstract class BaseReferenceServiceImpl extends BaseServiceImpl implement
* Removes the specified tree and deletes all entities referenced by within any of the references.
* Does not delete the root element and does not update the schema
*
* @param rootReferenceId - The ID of the root reference
* @param schemaId - The ID of the root reference
* @param auth - AuthPojo
* @throws IllegalArgumentException Thrown if any of the references in the deleted subtree has an invalid ID
* @throws ClassNotFoundException Thrown if a class name is specified that cannot be found by the current classloader
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment