Skip to content

Commit

Permalink
build and run the parser as a JAR to prevent ClassNotFoundExceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Thurner committed Apr 30, 2024
1 parent 2066d3f commit 67c28f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/analysis-of-endpoint-connections.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ jobs:
- name: Build with Gradle
run: ./gradlew :supporting_scripts:analysis-of-endpoint-connections:build

- name: Run QDox analysis
run: java -cp "supporting_scripts/analysis-of-endpoint-connections/build/classes/java/main:supporting_scripts/analysis-of-endpoint-connections/build/libs/*" analysisOfEndpointConnections.AnalysisOfEndpointConnections $(cat modified_files.txt)
- name: Run QDox analysis |
run: ./gradlew :supporting_scripts:analysis-of-endpoint-connections:shadowJar
java -jar supporting_scripts/analysis-of-endpoint-connections/build/libs/analysis-of-endpoint-connections-1.0-SNAPSHOT-all.jar $(cat modified_files.txt)
# run: java -cp "supporting_scripts/analysis-of-endpoint-connections/build/classes/java/main:supporting_scripts/analysis-of-endpoint-connections/build/libs/*" analysisOfEndpointConnections.AnalysisOfEndpointConnections $(cat modified_files.txt)
# run: java -cp supporting_scripts/analysis-of-endpoint-connections/build/classes/java/main analysisOfEndpointConnections.AnalysisOfEndpointConnections $(cat modified_files.txt)
10 changes: 10 additions & 0 deletions supporting_scripts/analysis-of-endpoint-connections/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id 'java'
id 'com.github.johnrengelman.shadow' version '7.1.0'
}

group 'com.example'
Expand All @@ -18,3 +19,12 @@ dependencies {
test {
useJUnitPlatform()
}

jar {
manifest {
attributes 'Main-Class': 'analysisOfEndpointConnections.AnalysisOfEndpointConnections'
}
from {
configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) }
}
}

0 comments on commit 67c28f7

Please sign in to comment.