From d5963088ac02bf6b9c5068d7fa6d68e5eb48e4ba Mon Sep 17 00:00:00 2001 From: Steven Williams Date: Fri, 20 Sep 2024 11:49:11 -0400 Subject: [PATCH] Add Maven profile for CLI --- Java/measureeval/README.md | 13 +++++-------- Java/measureeval/pom.xml | 21 ++++++++++++++++++++- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/Java/measureeval/README.md b/Java/measureeval/README.md index 543e07d4d..4e20c4cef 100644 --- a/Java/measureeval/README.md +++ b/Java/measureeval/README.md @@ -6,13 +6,10 @@ Perform the following from the `/Java` directory, which builds the measureeval J module: ```bash -mvn clean install -pl measureeval -am +mvn -P cli -pl measureeval -am clean package ``` -## Running the CLI - -To bypass the JAR manifest's main() class that runs it as a service, run the JAR with the following parameters: -`-Dloader.main=com.lantanagroup.link.measureeval.FileSystemInvocation org.springframework.boot.loader.launch.PropertiesLauncher` +We use the `cli` Maven profile to ensure that `FileSystemInvocation` is used as the main class. ### Parameters @@ -28,11 +25,11 @@ To bypass the JAR manifest's main() class that runs it as a service, run the JAR Format: ```bash -java -cp measureeval-.jar -Dloader.main=com.lantanagroup.link.measureeval.FileSystemInvocation org.springframework.boot.loader.launch.PropertiesLauncher "" "" "" "" +java -jar measureeval-.jar "" "" "" "" ``` Example: ```bash -java -cp measureeval-.jar -Dloader.main=com.lantanagroup.link.measureeval.FileSystemInvocation org.springframework.boot.loader.launch.PropertiesLauncher "C:/path/to/measure-bundle.json" "C:/path/to/patient-bundle.json" "2021-01-01" "2021-12-31" -``` \ No newline at end of file +java -jar measureeval-.jar "C:/path/to/measure-bundle.json" "C:/path/to/patient-bundle.json" "2021-01-01" "2021-12-31" +``` diff --git a/Java/measureeval/pom.xml b/Java/measureeval/pom.xml index 188c94c77..42a8a49e9 100644 --- a/Java/measureeval/pom.xml +++ b/Java/measureeval/pom.xml @@ -146,7 +146,7 @@ - com.lantanagroup.link.measureeval.MeasureEvalApplication + ${mainClass} org.projectlombok @@ -157,4 +157,23 @@ + + + + api + + true + + + com.lantanagroup.link.measureeval.MeasureEvalApplication + + + + + cli + + com.lantanagroup.link.measureeval.FileSystemInvocation + + +