Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,8 @@ prism/\.project
# Eclipse project custom settings
\.settings/
prism/\.settings/

# Dependency management via Gradle
prism/etc/jars/.gradle/
prism/etc/jars/build/
prism/etc/jars/local-libs/
18 changes: 18 additions & 0 deletions prism/etc/jars/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Local (Gradle-based) management of dependent jars, kept in `lib`

To find dependencies and copy into `lib`:

* `gradle -p etc/jars syncLibs`

To see what changed:

* `git diff lib`

To remove files in `lib` in order to re-run:

* `gradle -p etc/jars cleanLibs`

To print dependency tree:

* `gradle -p etc/jars dependencies --configuration runtimeClasspath`

109 changes: 109 additions & 0 deletions prism/etc/jars/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
// Gradle-based download of dependency jars

plugins {
id 'java'
}

java {
sourceCompatibility = JavaVersion.VERSION_1_9
targetCompatibility = JavaVersion.VERSION_1_9
}

repositories {
mavenCentral()
}

configurations {
// Bucket for the JUnit standalone runner
testRunner
}

// Libraries not on Maven Central
// Get from prismmodelchecker.org and cache in local-libs

def prismJarBaseUrl = "https://www.prismmodelchecker.org/other/"
def prismJarStashDir = file("local-libs")

def customJars = [
"jhoafparser-1.1.1.jar",
"epsgraphics-1.0.0.jar",
"nailgun-server-0.9.2-SNAPSHOT.jar",
"pepa.jar"
]

tasks.register('downloadPrismJars') {
group = "PRISM"
description = "Downloads non-Maven jars from the PRISM website."

doLast {
if (!prismJarStashDir.exists()) prismJarStashDir.mkdirs()

customJars.each { jarName ->
def destFile = new File(prismJarStashDir, jarName)
if (!destFile.exists()) {
println "Downloading ${jarName}..."
ant.get(src: "${prismJarBaseUrl}${jarName}", dest: destFile)
}
}
}
}

// Main dependencies

dependencies {

implementation 'colt:colt:1.2.0'
implementation("de.uni-mannheim.rz.krum:jas:2.7.90")
implementation 'org.jfree:jfreechart:1.0.14'
implementation 'org.jfree:jcommon:1.0.17'
//implementation("com.martiansoftware:nailgun-server:0.9.1")
implementation 'it.unimi.dsi:fastutil:8.5.15'
implementation 'org.apache.commons:commons-compress:1.24.0'
implementation 'org.tukaani:xz:1.10'
implementation 'com.google.code.gson:gson:2.11.0'
implementation 'org.apache.logging.log4j:log4j-api:2.17.1'
implementation 'org.apache.logging.log4j:log4j-core:2.17.1'

// JUnit: for simplicity, don't put in separate test group for now
implementation 'org.junit.platform:junit-platform-console-standalone:1.7.2'
//testRunner 'org.junit.platform:junit-platform-console-standalone:1.9.3'

// Grab anything we can't find online from our local stash
implementation fileTree(dir: 'local-libs', include: ['*.jar'])
}

tasks.register('syncLibs', Copy) {
group = "PRISM"
description = "Downloads and copies JAR dependencies into the lib/ folder."

dependsOn 'downloadPrismJars'

// 1. Production Libs
from(configurations.runtimeClasspath) {
into "lib"
}

// 2. Test Libs
from(configurations.testRunner) {
into "lib/test"
}

// 3. Clean up version numbers (Optional)
// If your Makefile expects 'gson.jar' instead of 'gson-2.11.0.jar',
// uncomment the line below:
// rename { it.replaceAll(/-\d+\..*jar$/, ".jar") }

// Anchor this task to the parent parent directory (prism/)
destinationDir = file("../..")

// Optional: This ensures the task always runs if you call it,
// preventing Gradle from saying "Up-to-Date" if you've manually deleted a JAR.
outputs.upToDateWhen { false }
}

tasks.register('cleanLibs', Delete) {
group = "PRISM"
description = "Deletes all JARs in the lib/ and lib/test/ folders."
delete fileTree("../../lib") { include "*.jar" }
delete "../../lib/test"
}
1 change: 1 addition & 0 deletions prism/etc/jars/settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rootProject.name = 'prism-dependency-manager'
38 changes: 23 additions & 15 deletions prism/lib/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
To simplify maintenance of scripts and config files, we mostly omit version numbers in the filenames of the various libraries included here. For reference, they are:
This folder contains the following libraries:

* colt.jar - Colt version 1.2.0
* commons-compress.jar - Apache Commons Compress version 1.24.0
* epsgraphics.jar - EPS Graphics version 1.0.0
* fastutil.jar - fastutil version 8.5.15
* gson.jar - Gson version 2.11.0
* jas.jar - Java Algebra System (JAS) version 2.7.90
* log4j-core.jar, log4j-api.jar - Apache Log4j version 2.16.0 (dependency of JAS)
* jcommon.jar - JCommon, version 1.0.16
* jfreechart.jar - JFreeChart, version 1.0.13
* jhoafparser.jar - jhoafparser, version 1.1.1
* junit-platform-console-standalone.jar - JUnit 5 executable & dependencies, version 1.7.2
* nailgun-server.jar - Nailgun, version 0.9.2-SNAPSHOT
* pepa.zip - PEPA-to-PRISM Compiler version 0.03.2
* xz.jar - XZ for Java version 1.10
```
+--- colt:colt:1.2.0
| \--- concurrent:concurrent:1.3.4
+--- de.uni-mannheim.rz.krum:jas:2.7.90
| \--- org.apache.logging.log4j:log4j-api:2.13.2 -> 2.17.1
+--- org.jfree:jfreechart:1.0.14
| +--- org.jfree:jcommon:1.0.17
| +--- xml-apis:xml-apis:1.3.04
| \--- com.lowagie:itext:2.1.5
| +--- bouncycastle:bcmail-jdk14:138
| \--- bouncycastle:bcprov-jdk14:138
+--- org.jfree:jcommon:1.0.17
+--- it.unimi.dsi:fastutil:8.5.15
+--- org.apache.commons:commons-compress:1.24.0
+--- org.tukaani:xz:1.10
+--- com.google.code.gson:gson:2.11.0
| \--- com.google.errorprone:error_prone_annotations:2.27.0
+--- org.apache.logging.log4j:log4j-api:2.17.1
+--- org.apache.logging.log4j:log4j-core:2.17.1
| \--- org.apache.logging.log4j:log4j-api:2.17.1
\--- org.junit.platform:junit-platform-console-standalone:1.7.2
```

See here for more details and links:

Expand Down
Binary file added prism/lib/bcmail-jdk14-138.jar
Binary file not shown.
Binary file added prism/lib/bcprov-jdk14-138.jar
Binary file not shown.
Binary file renamed prism/lib/colt.jar → prism/lib/colt-1.2.0.jar
Binary file not shown.
File renamed without changes.
Binary file added prism/lib/concurrent-1.3.4.jar
Binary file not shown.
File renamed without changes.
Binary file added prism/lib/error_prone_annotations-2.27.0.jar
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added prism/lib/itext-2.1.5.jar
Binary file not shown.
Binary file added prism/lib/jas-2.7.90.jar
Binary file not shown.
Binary file removed prism/lib/jas.jar
Binary file not shown.
Binary file added prism/lib/jcommon-1.0.17.jar
Binary file not shown.
Binary file removed prism/lib/jcommon.jar
Binary file not shown.
Binary file renamed prism/lib/jfreechart.jar → prism/lib/jfreechart-1.0.14.jar
100755 → 100644
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file added prism/lib/pepa.jar
Binary file not shown.
Binary file removed prism/lib/pepa.zip
Binary file not shown.
Binary file added prism/lib/xml-apis-1.3.04.jar
Binary file not shown.
File renamed without changes.