Skip to content

Commit

Permalink
restructure build
Browse files Browse the repository at this point in the history
  • Loading branch information
Schmoho committed Sep 6, 2024
1 parent cb9180a commit 9f35b28
Show file tree
Hide file tree
Showing 544 changed files with 265,250 additions and 9,504 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
/.vscode/
/bin
/build/
/gradle
/lib
/minimalSysBio.xml
/model_polisher.log
/out
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ ModelPolisher can also be run locally.
If you want to process a large number of models, or you don't feel comfortable using the Python API client package, this is the recommendend usage.

### Parameters
Parameters can be passed via a [json file](examples/config.json) or as command line arguments.
Parameters can be passed via a [json file](app/examples/config.json) or as command line arguments.

See [the Wiki](https://github.com/draeger-lab/ModelPolisher/wiki/Parameters) for more information.

### Using Docker
ModelPolisher is provided as a Docker image.

This repository contains a [`docker-compose.yml`](./docker-compose.yml) which also sets up BiGG DB and AnnotateDB as Docker containers, to support the [annotation functionality](https://github.com/draeger-lab/ModelPolisher/wiki/Annotation).
This repository contains a [`docker-compose.yml`](app/docker-compose.yml) which also sets up BiGG DB and AnnotateDB as Docker containers, to support the [annotation functionality](https://github.com/draeger-lab/ModelPolisher/wiki/Annotation).

For a single model file, you can use
``` shell
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile → app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FROM openjdk:17-slim
LABEL maintainer="[email protected]"

# Copy the ModelPolisher jar file into the root directory of the image
COPY target/ModelPolisher-2.1-pre-release-STANDALONE.jar /
COPY ../target/ModelPolisher-2.1-pre-release-STANDALONE.jar /

# Set the container to run the ModelPolisher jar file as the default executable
ENTRYPOINT ["java", "-jar", "/ModelPolisher-2.1-pre-release-STANDALONE.jar"]
Expand Down
126 changes: 126 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
import com.github.jk1.license.filter.ExcludeTransitiveDependenciesFilter
import com.github.jk1.license.filter.LicenseBundleNormalizer

plugins {
id 'com.github.jk1.dependency-license-report' version '2.0'
id "java"
id "application"
id "maven-publish"
}

group = "de.uni-halle.informatik.biodata"
version = "2.1"


application {
mainClass.set('de.uni_halle.informatik.biodata.mp.ModelPolisherCLILauncher')
}


sourceSets {
main {
java {
srcDirs = ["src/main/java"]
}
resources {
srcDirs = ["src/main/resources"]
}
}
}

dependencies {
implementation(libs.sysbio)
implementation(libs.jsbml) {
exclude group: "org.apache.logging.log4j", module: "log4j-core"
exclude group: "org.apache.logging.log4j", module: "log4j-slf4j-impl"
exclude group: "org.apache.commons", module: "logging"
}

implementation(libs.biojavaOntology) {
exclude group: "org.apache.logging.log4j", module: "log4j-core"
exclude group: "org.apache.logging.log4j", module: "log4j-slf4j-impl"
}

implementation(libs.jacksonDatabinding)

implementation(libs.commonsIO)
implementation(libs.commonsLang)

implementation(libs.slf4j)
implementation(libs.julToSlf4j)
implementation(libs.jclOverSlf4j)
implementation(libs.log4jOverSlf4j)
implementation(libs.osgiOverSlf4j)

implementation(libs.logback)

implementation project(':lib')
}

// config for all jar tasks
tasks.withType(Jar).configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
destinationDirectory = file("$rootDir/target")
manifest {
attributes("Version": project.version,
"Implementation-Title": "ModelPolisher",
"Implementation-Version": project.version,
"Specification-Vendor": "Martin-Luther-Universität Halle-Wittenberg, BioDatA Arbeitsgruppe",
"Specification-Title": "ModelPolisher",
"Implementation-Vendor-Id": "de.uni-halle.informatik.biodata",
"Implementation-Vendor": "Martin-Luther-Universität Halle-Wittenberg, BioDatA Arbeitsgruppe",
"Main-Class": "de.uni_halle.informatik.biodata.mp.ModelPolisherCLILauncher")
}

into("META-INF/maven/${project.group}/${rootProject.name}") {
from { generatePomFileForModelPolisherStandalonePublication }
rename { it.replace('pom-default.xml', 'pom.xml') }
}

archiveFileName = "${rootProject.name}-${project.version}-STANDALONE.jar"

from sourceSets.main.output

dependsOn configurations.runtimeClasspath
from {
configurations.runtimeClasspath.findAll { it.name.endsWith('jar') }.collect { zipTree(it) }
}
}


publishing {
publications {
modelPolisherStandalone(MavenPublication) {
from components.java

artifactId = 'ModelPolisher'
version = "2.1-STANDALONE "
}
}
// https://reposilite.com/guide/gradle
repositories {
maven {
name = "reposilite"
url = "https://biodata.informatik.uni-halle.de/maven/releases"
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
}


licenseReport {
filters = [new LicenseBundleNormalizer(),
new ExcludeTransitiveDependenciesFilter()]
}

tasks.withType(Javadoc).configureEach {
enabled = false
}

clean.doFirst {
file(".gradle").deleteDir()
file("target").deleteDir()
}
177 changes: 177 additions & 0 deletions app/build/publications/modelPolisherStandalone/module.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
{
"formatVersion": "1.1",
"component": {
"group": "de.uni-halle.informatik.biodata",
"module": "ModelPolisher",
"version": "2.1-STANDALONE",
"attributes": {
"org.gradle.status": "release"
}
},
"createdBy": {
"gradle": {
"version": "8.10"
}
},
"variants": [
{
"name": "apiElements",
"attributes": {
"org.gradle.category": "library",
"org.gradle.dependency.bundling": "external",
"org.gradle.jvm.version": 17,
"org.gradle.libraryelements": "jar",
"org.gradle.usage": "java-api"
},
"files": [
{
"name": "ModelPolisher-2.1-STANDALONE.jar",
"url": "ModelPolisher-2.1-STANDALONE.jar",
"size": 15506284,
"sha512": "4642cc0b0339d805b6b4954b76a95815cabede6addfdf78e0d23285415a6a9c9be1e3a6e5ddf0b7b591b9d65ca0de53c83eb91ed7506cf9622bc69981d35f0e0",
"sha256": "00fc618c0faa6bb331f58e2fd528023ff3fa0ed5da6a04785d5ded55e20380d9",
"sha1": "11b53446e069b42955fb16cefa98feb4eccf79a7",
"md5": "168891d7aceb03fa357715f103030948"
}
]
},
{
"name": "runtimeElements",
"attributes": {
"org.gradle.category": "library",
"org.gradle.dependency.bundling": "external",
"org.gradle.jvm.version": 17,
"org.gradle.libraryelements": "jar",
"org.gradle.usage": "java-runtime"
},
"dependencies": [
{
"group": "de.zbit.SysBio",
"module": "SysBio",
"version": {
"requires": "1390"
}
},
{
"group": "org.sbml.jsbml",
"module": "jsbml",
"version": {
"requires": "1.6.1"
},
"excludes": [
{
"group": "org.apache.logging.log4j",
"module": "log4j-slf4j-impl"
},
{
"group": "org.apache.logging.log4j",
"module": "log4j-core"
},
{
"group": "org.apache.commons",
"module": "logging"
}
]
},
{
"group": "org.biojava",
"module": "biojava-ontology",
"version": {
"requires": "7.1.1"
},
"excludes": [
{
"group": "org.apache.logging.log4j",
"module": "log4j-slf4j-impl"
},
{
"group": "org.apache.logging.log4j",
"module": "log4j-core"
}
]
},
{
"group": "com.fasterxml.jackson.core",
"module": "jackson-databind",
"version": {
"requires": "2.17.1"
}
},
{
"group": "commons-io",
"module": "commons-io",
"version": {
"requires": "2.16.1"
}
},
{
"group": "org.apache.commons",
"module": "commons-lang3",
"version": {
"requires": "3.15.0"
}
},
{
"group": "org.slf4j",
"module": "slf4j-api",
"version": {
"requires": "2.0.16"
}
},
{
"group": "org.slf4j",
"module": "jul-to-slf4j",
"version": {
"requires": "2.0.16"
}
},
{
"group": "org.slf4j",
"module": "jcl-over-slf4j",
"version": {
"requires": "2.0.16"
}
},
{
"group": "org.slf4j",
"module": "log4j-over-slf4j",
"version": {
"requires": "2.0.16"
}
},
{
"group": "org.slf4j",
"module": "osgi-over-slf4j",
"version": {
"requires": "2.0.16"
}
},
{
"group": "ch.qos.logback",
"module": "logback-classic",
"version": {
"requires": "1.5.7"
}
},
{
"group": "de.uni-halle.informatik.biodata",
"module": "ModelPolisher",
"version": {
"requires": "2.1"
}
}
],
"files": [
{
"name": "ModelPolisher-2.1-STANDALONE.jar",
"url": "ModelPolisher-2.1-STANDALONE.jar",
"size": 15506284,
"sha512": "4642cc0b0339d805b6b4954b76a95815cabede6addfdf78e0d23285415a6a9c9be1e3a6e5ddf0b7b591b9d65ca0de53c83eb91ed7506cf9622bc69981d35f0e0",
"sha256": "00fc618c0faa6bb331f58e2fd528023ff3fa0ed5da6a04785d5ded55e20380d9",
"sha1": "11b53446e069b42955fb16cefa98feb4eccf79a7",
"md5": "168891d7aceb03fa357715f103030948"
}
]
}
]
}
Loading

0 comments on commit 9f35b28

Please sign in to comment.