From 392feb7082f36c5b6cbff652ad1318a9ffb78427 Mon Sep 17 00:00:00 2001 From: James Agnew Date: Mon, 30 Apr 2018 15:04:35 -0400 Subject: [PATCH] Refactor CLI to extract commands --- hapi-deployable-pom/pom.xml | 21 ++ hapi-fhir-cli/hapi-fhir-cli-api/pom.xml | 214 ++++++++++++++++++ .../src/main/java/ca/uhn/fhir/cli/App.java | 0 .../main/java/ca/uhn/fhir/cli/BaseApp.java | 0 .../java/ca/uhn/fhir/cli/BaseCommand.java | 0 .../uhn/fhir/cli/CommandFailureException.java | 0 .../ca/uhn/fhir/cli/ExampleDataUploader.java | 0 .../java/ca/uhn/fhir/cli/IgPackUploader.java | 0 .../cli/LoadingValidationSupportDstu2.java | 0 .../cli/LoadingValidationSupportDstu3.java | 0 .../fhir/cli/LoadingValidationSupportR4.java | 0 .../ca/uhn/fhir/cli/RunServerCommand.java | 0 .../fhir/cli/UploadTerminologyCommand.java | 21 +- .../java/ca/uhn/fhir/cli/ValidateCommand.java | 0 .../uhn/fhir/cli/ValidationDataUploader.java | 0 .../fhir/cli/WebsocketSubscribeCommand.java | 0 .../src/main/resources/logback-cli-off.xml | 0 .../src/main/resources/logback-cli-on.xml | 0 .../src/main/script/hapi-fhir-cli | 0 .../src/main/script/hapi-fhir-cli.cmd | 0 .../ca/uhn/fhir/cli/InstallIgPackTest.java | 0 .../java/ca/uhn/fhir/cli/OptionsTest.java | 4 + .../java/ca/uhn/fhir/cli/ValidateTest.java | 2 +- .../nl/nl-core-address-official.dstu2.xml | 0 .../resources/nl/nl-core-address.dstu2.xml | 0 .../nl-core-humanname-familyname-prefix.xml | 0 .../nl/nl-core-humanname-familyname.xml | 0 .../test/resources/nl/nl-core-humanname.xml | 0 .../resources/nl/nl-core-patient.dstu2.xml | 0 .../test/resources/nl/patient-example-a.xml | 0 .../src/test/resources/nl/validate.sh | 0 .../test/resources/patient-uslab-example1.xml | 0 .../test/resources/uslab-patient.profile.xml | 0 hapi-fhir-cli/hapi-fhir-cli-app/pom.xml | 181 --------------- hapi-fhir-cli/pom.xml | 1 + pom.xml | 2 + 36 files changed, 246 insertions(+), 200 deletions(-) create mode 100644 hapi-fhir-cli/hapi-fhir-cli-api/pom.xml rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/App.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/BaseApp.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/BaseCommand.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/CommandFailureException.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/ExampleDataUploader.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/IgPackUploader.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu2.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu3.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java (84%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/ValidateCommand.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/ValidationDataUploader.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/java/ca/uhn/fhir/cli/WebsocketSubscribeCommand.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/resources/logback-cli-off.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/resources/logback-cli-on.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/script/hapi-fhir-cli (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/main/script/hapi-fhir-cli.cmd (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/java/ca/uhn/fhir/cli/InstallIgPackTest.java (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/java/ca/uhn/fhir/cli/OptionsTest.java (63%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/java/ca/uhn/fhir/cli/ValidateTest.java (92%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/nl/nl-core-address-official.dstu2.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/nl/nl-core-address.dstu2.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/nl/nl-core-humanname-familyname-prefix.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/nl/nl-core-humanname-familyname.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/nl/nl-core-humanname.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/nl/nl-core-patient.dstu2.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/nl/patient-example-a.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/nl/validate.sh (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/patient-uslab-example1.xml (100%) rename hapi-fhir-cli/{hapi-fhir-cli-app => hapi-fhir-cli-api}/src/test/resources/uslab-patient.profile.xml (100%) diff --git a/hapi-deployable-pom/pom.xml b/hapi-deployable-pom/pom.xml index df1e133619a..4ec22a88188 100644 --- a/hapi-deployable-pom/pom.xml +++ b/hapi-deployable-pom/pom.xml @@ -115,10 +115,31 @@ org.springframework spring-jcl + + org.springframework + spring-jcl + + + com.google.code.findbugs + annotations + + + org.apache.derby + derbyclient + + + org.apache.derby + derbynet + + + org.apache.derby + derbyclient + changelog.txt javac.bat + about.html diff --git a/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml new file mode 100644 index 00000000000..d513da069c3 --- /dev/null +++ b/hapi-fhir-cli/hapi-fhir-cli-api/pom.xml @@ -0,0 +1,214 @@ + + 4.0.0 + + + ca.uhn.hapi.fhir + hapi-deployable-pom + 3.4.0-SNAPSHOT + ../../hapi-deployable-pom/pom.xml + + + hapi-fhir-cli-api + jar + + HAPI FHIR - Command Line Client - API + + + + + + ca.uhn.hapi.fhir + hapi-fhir-base + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-jpaserver-base + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-cli-jpaserver + ${project.version} + jar + classes + + + + org.apache.commons + commons-compress + 1.14 + + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu2 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-dstu3 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-structures-hl7org-dstu2 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-validation-resources-dstu2 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-validation-resources-dstu3 + ${project.version} + + + ca.uhn.hapi.fhir + hapi-fhir-igpacks + ${project.version} + + + + ch.qos.logback + logback-classic + + + javax.servlet + javax.servlet-api + + + + commons-cli + commons-cli + + + + org.springframework + spring-core + + + commons-logging + commons-logging + + + + + org.springframework + spring-webmvc + + + org.springframework + spring-context + + + xml-apis + xml-apis + + + + + org.springframework + spring-beans + + + org.springframework + spring-tx + + + org.springframework + spring-context-support + + + org.springframework + spring-web + + + + org.eclipse.jetty + jetty-servlets + + + org.eclipse.jetty + jetty-servlet + + + org.eclipse.jetty + jetty-server + + + org.eclipse.jetty + jetty-util + + + org.eclipse.jetty + jetty-webapp + + + org.eclipse.jetty.websocket + websocket-api + + + org.eclipse.jetty.websocket + websocket-client + + + org.slf4j + jcl-over-slf4j + + + + org.thymeleaf + thymeleaf + + + org.thymeleaf + thymeleaf-spring4 + + + + com.phloc + phloc-schematron + + + Saxon-HE + net.sf.saxon + + + + + com.phloc + phloc-commons + + + + + javax.xml.bind + jaxb-api + + + com.sun.xml.bind + jaxb-core + + + com.sun.xml.bind + jaxb-impl + + + + org.fusesource.jansi + jansi + + + + + + + + + + diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/App.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/App.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/App.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/App.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/BaseApp.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/BaseApp.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseApp.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/BaseCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseCommand.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/BaseCommand.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/BaseCommand.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/CommandFailureException.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/CommandFailureException.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/CommandFailureException.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/CommandFailureException.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/ExampleDataUploader.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExampleDataUploader.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/ExampleDataUploader.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ExampleDataUploader.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/IgPackUploader.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/IgPackUploader.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/IgPackUploader.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/IgPackUploader.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu2.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu2.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu2.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu2.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu3.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu3.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu3.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportDstu3.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/LoadingValidationSupportR4.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/RunServerCommand.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java similarity index 84% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java index 08acc81e0d7..ae2f759d9f9 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/UploadTerminologyCommand.java @@ -37,28 +37,13 @@ public class UploadTerminologyCommand extends BaseCommand { @Override public Options getOptions() { Options options = new Options(); - Option opt; addFhirVersionOption(options); - - opt = new Option("t", "target", true, "Base URL for the target server (e.g. \"http://example.com/fhir\")"); - opt.setRequired(true); - options.addOption(opt); - - opt = new Option("u", "url", true, "The code system URL associated with this upload (e.g. " + IHapiTerminologyLoaderSvc.SCT_URI + ")"); - opt.setRequired(false); - options.addOption(opt); - - opt = new Option("d", "data", true, "Local file to use to upload (can be a raw file or a ZIP containing the raw file)"); - opt.setRequired(false); - options.addOption(opt); - + addRequiredOption(options, "t", "target", true, "Base URL for the target server (e.g. \"http://example.com/fhir\")"); + addRequiredOption(options, "u", "url", true, "The code system URL associated with this upload (e.g. " + IHapiTerminologyLoaderSvc.SCT_URI + ")"); + addOptionalOption(options, "d", "data", true, "Local file to use to upload (can be a raw file or a ZIP containing the raw file)"); addBasicAuthOption(options); - opt = new Option("v", "verbose", false, "Verbose output"); - opt.setRequired(false); - options.addOption(opt); - return options; } diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/ValidateCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidateCommand.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/ValidateCommand.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidateCommand.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/ValidationDataUploader.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidationDataUploader.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/ValidationDataUploader.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/ValidationDataUploader.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/WebsocketSubscribeCommand.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/WebsocketSubscribeCommand.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/java/ca/uhn/fhir/cli/WebsocketSubscribeCommand.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/java/ca/uhn/fhir/cli/WebsocketSubscribeCommand.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/resources/logback-cli-off.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/resources/logback-cli-off.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/resources/logback-cli-off.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/resources/logback-cli-off.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/resources/logback-cli-on.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/resources/logback-cli-on.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/resources/logback-cli-on.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/resources/logback-cli-on.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/script/hapi-fhir-cli b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/script/hapi-fhir-cli similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/script/hapi-fhir-cli rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/script/hapi-fhir-cli diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/main/script/hapi-fhir-cli.cmd b/hapi-fhir-cli/hapi-fhir-cli-api/src/main/script/hapi-fhir-cli.cmd similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/main/script/hapi-fhir-cli.cmd rename to hapi-fhir-cli/hapi-fhir-cli-api/src/main/script/hapi-fhir-cli.cmd diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/java/ca/uhn/fhir/cli/InstallIgPackTest.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/InstallIgPackTest.java similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/java/ca/uhn/fhir/cli/InstallIgPackTest.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/InstallIgPackTest.java diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/java/ca/uhn/fhir/cli/OptionsTest.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/OptionsTest.java similarity index 63% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/java/ca/uhn/fhir/cli/OptionsTest.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/OptionsTest.java index fb88ef5c81a..c705a38fd3f 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/java/ca/uhn/fhir/cli/OptionsTest.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/OptionsTest.java @@ -6,6 +6,10 @@ public class OptionsTest { @Test public void testOptions() { + + UploadTerminologyCommand uploadTerminologyCommand = new UploadTerminologyCommand(); + uploadTerminologyCommand.getOptions(); + App app = new App(); for (BaseCommand next : app.provideCommands()) { next.getOptions(); diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/java/ca/uhn/fhir/cli/ValidateTest.java b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateTest.java similarity index 92% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/java/ca/uhn/fhir/cli/ValidateTest.java rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateTest.java index 54be4b36624..0fa6390f95c 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/java/ca/uhn/fhir/cli/ValidateTest.java +++ b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/java/ca/uhn/fhir/cli/ValidateTest.java @@ -8,7 +8,7 @@ public class ValidateTest { @Before public void before() { - System.setProperty("noexit", "true"); + System.setProperty("test", "true"); } @Test diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-address-official.dstu2.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-address-official.dstu2.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-address-official.dstu2.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-address-official.dstu2.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-address.dstu2.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-address.dstu2.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-address.dstu2.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-address.dstu2.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-humanname-familyname-prefix.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-humanname-familyname-prefix.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-humanname-familyname-prefix.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-humanname-familyname-prefix.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-humanname-familyname.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-humanname-familyname.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-humanname-familyname.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-humanname-familyname.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-humanname.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-humanname.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-humanname.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-humanname.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-patient.dstu2.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-patient.dstu2.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/nl-core-patient.dstu2.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/nl-core-patient.dstu2.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/patient-example-a.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/patient-example-a.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/patient-example-a.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/patient-example-a.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/validate.sh b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/validate.sh similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/nl/validate.sh rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/nl/validate.sh diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/patient-uslab-example1.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/patient-uslab-example1.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/patient-uslab-example1.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/patient-uslab-example1.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/uslab-patient.profile.xml b/hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/uslab-patient.profile.xml similarity index 100% rename from hapi-fhir-cli/hapi-fhir-cli-app/src/test/resources/uslab-patient.profile.xml rename to hapi-fhir-cli/hapi-fhir-cli-api/src/test/resources/uslab-patient.profile.xml diff --git a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml index df74dbc162e..4fb2e600800 100644 --- a/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml +++ b/hapi-fhir-cli/hapi-fhir-cli-app/pom.xml @@ -17,17 +17,6 @@ - - - ca.uhn.hapi.fhir - hapi-fhir-base - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-jpaserver-base - ${project.version} - ca.uhn.hapi.fhir hapi-fhir-cli-jpaserver @@ -48,176 +37,6 @@ classes - - org.apache.commons - commons-compress - 1.14 - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-dstu3 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-structures-hl7org-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-validation-resources-dstu2 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-validation-resources-dstu3 - ${project.version} - - - ca.uhn.hapi.fhir - hapi-fhir-igpacks - ${project.version} - - - - ch.qos.logback - logback-classic - - - javax.servlet - javax.servlet-api - - - - commons-cli - commons-cli - - - - org.springframework - spring-core - - - commons-logging - commons-logging - - - - - org.springframework - spring-webmvc - - - org.springframework - spring-context - - - xml-apis - xml-apis - - - - - org.springframework - spring-beans - - - org.springframework - spring-tx - - - org.springframework - spring-context-support - - - org.springframework - spring-web - - - - org.eclipse.jetty - jetty-servlets - - - org.eclipse.jetty - jetty-servlet - - - org.eclipse.jetty - jetty-server - - - org.eclipse.jetty - jetty-util - - - org.eclipse.jetty - jetty-webapp - - - org.eclipse.jetty.websocket - websocket-api - - - org.eclipse.jetty.websocket - websocket-client - - - org.slf4j - jcl-over-slf4j - - - - org.thymeleaf - thymeleaf - - - org.thymeleaf - thymeleaf-spring4 - - - - com.phloc - phloc-schematron - - - Saxon-HE - net.sf.saxon - - - - - com.phloc - phloc-commons - - - - - javax.xml.bind - jaxb-api - - - com.sun.xml.bind - jaxb-core - - - com.sun.xml.bind - jaxb-impl - - - - org.fusesource.jansi - jansi - - diff --git a/hapi-fhir-cli/pom.xml b/hapi-fhir-cli/pom.xml index 676ad165864..5b37384bd4a 100644 --- a/hapi-fhir-cli/pom.xml +++ b/hapi-fhir-cli/pom.xml @@ -16,6 +16,7 @@ hapi-fhir-cli-jpaserver + hapi-fhir-cli-api hapi-fhir-cli-app diff --git a/pom.xml b/pom.xml index 0a6b3e4d698..7879f07df90 100644 --- a/pom.xml +++ b/pom.xml @@ -40,6 +40,7 @@ +