From c003047ca98ee6246febe0b173543e84c575444f Mon Sep 17 00:00:00 2001 From: "jelmer.terwal" Date: Tue, 22 Oct 2019 17:55:55 +0200 Subject: [PATCH] Split test from example --- hapi-fhir-jaxrsserver-example/pom.xml | 42 ----- pom.xml | 9 +- .../pom.xml | 165 ++++++++++++++++++ .../server/example/ExtendedOrganization.kt | 0 .../example/ExtendedOrganizationResource.kt | 0 .../src/main/webapp/WEB-INF/web.xml | 52 ++++++ .../ExtendedOrganizationResourceTest.kt | 0 .../src/test/resources/logback-test.xml | 30 ++++ 8 files changed, 252 insertions(+), 46 deletions(-) create mode 100644 tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml rename {hapi-fhir-jaxrsserver-example => tests/hapi-fhir-base-test-jaxrsserver-kotlin}/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganization.kt (100%) rename {hapi-fhir-jaxrsserver-example => tests/hapi-fhir-base-test-jaxrsserver-kotlin}/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResource.kt (100%) create mode 100644 tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/main/webapp/WEB-INF/web.xml rename {hapi-fhir-jaxrsserver-example => tests/hapi-fhir-base-test-jaxrsserver-kotlin}/src/test/kotlin/ca/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResourceTest.kt (100%) create mode 100644 tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/test/resources/logback-test.xml diff --git a/hapi-fhir-jaxrsserver-example/pom.xml b/hapi-fhir-jaxrsserver-example/pom.xml index a91d125f5d5..bf2f46e9b1c 100644 --- a/hapi-fhir-jaxrsserver-example/pom.xml +++ b/hapi-fhir-jaxrsserver-example/pom.xml @@ -89,16 +89,6 @@ ${project.version} test - - org.jetbrains.kotlin - kotlin-maven-allopen - ${kotlin.version} - - - org.jetbrains.kotlin - kotlin-maven-noarg - ${kotlin.version} - @@ -128,38 +118,6 @@ true - - org.jetbrains.kotlin - kotlin-maven-plugin - ${kotlin.version} - - - compile - compile - - - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/main/java - - - - - test-compile - test-compile - - - ${project.basedir}/src/test/kotlin - ${project.basedir}/src/test/java - - - - - - - - true - 1.3.50 - diff --git a/pom.xml b/pom.xml index bd70d2ed457..bc6c5696b07 100755 --- a/pom.xml +++ b/pom.xml @@ -68,7 +68,7 @@ - junit @@ -1819,7 +1819,7 @@ - @@ -2360,7 +2360,7 @@ sign - @@ -2468,6 +2468,7 @@ example-projects/hapi-fhir-jpaserver-dynamic example-projects/hapi-fhir-jpaserver-example-postgres --> + tests/hapi-fhir-base-test-jaxrsserver-kotlin tests/hapi-fhir-base-test-mindeps-client tests/hapi-fhir-base-test-mindeps-server hapi-fhir-spring-boot diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml new file mode 100644 index 00000000000..635b569ec02 --- /dev/null +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/pom.xml @@ -0,0 +1,165 @@ + + 4.0.0 + + + + ca.uhn.hapi.fhir + hapi-fhir + 4.1.0-SNAPSHOT + ../pom.xml + + + hapi-fhir-base-test-jaxrsserver-kotlin + war + + HAPI FHIR JAX-RS Server Kotlin test + + + + oss-snapshots + + true + + https://oss.sonatype.org/content/repositories/snapshots/ + + + + + + + + ca.uhn.hapi.fhir + hapi-fhir-jaxrsserver-base + ${project.version} + + + 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-r4 + ${project.version} + + + javax.ws.rs + javax.ws.rs-api + 2.0.1 + provided + + + javax.ejb + ejb-api + 3.0 + provided + + + + org.eclipse.jetty + jetty-server + ${jetty_version} + + + org.eclipse.jetty + jetty-servlet + ${jetty_version} + + + org.jboss.resteasy + resteasy-jaxrs + + + org.jboss.resteasy + resteasy-client + + + ch.qos.logback + logback-classic + + + ca.uhn.hapi.fhir + hapi-fhir-test-utilities + ${project.version} + test + + + org.jetbrains.kotlin + kotlin-maven-allopen + ${kotlin.version} + + + org.jetbrains.kotlin + kotlin-maven-noarg + ${kotlin.version} + + + + + + hapi-fhir-jaxrsserver-example + + + + org.apache.maven.plugins + maven-failsafe-plugin + + true + + + + + integration-test + verify + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + + + compile + compile + + + ${project.basedir}/src/main/kotlin + ${project.basedir}/src/main/java + + + + + test-compile + test-compile + + + ${project.basedir}/src/test/kotlin + ${project.basedir}/src/test/java + + + + + + + + + + true + 1.3.50 + + diff --git a/hapi-fhir-jaxrsserver-example/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganization.kt b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganization.kt similarity index 100% rename from hapi-fhir-jaxrsserver-example/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganization.kt rename to tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganization.kt diff --git a/hapi-fhir-jaxrsserver-example/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResource.kt b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResource.kt similarity index 100% rename from hapi-fhir-jaxrsserver-example/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResource.kt rename to tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/main/kotlin/cn/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResource.kt diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/main/webapp/WEB-INF/web.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 00000000000..0bd809a85b1 --- /dev/null +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,52 @@ + + + + + + diff --git a/hapi-fhir-jaxrsserver-example/src/test/kotlin/ca/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResourceTest.kt b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/test/kotlin/ca/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResourceTest.kt similarity index 100% rename from hapi-fhir-jaxrsserver-example/src/test/kotlin/ca/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResourceTest.kt rename to tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/test/kotlin/ca/uhn/fhir/jaxrs/server/example/ExtendedOrganizationResourceTest.kt diff --git a/tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/test/resources/logback-test.xml b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/test/resources/logback-test.xml new file mode 100644 index 00000000000..e5cbbb9c22e --- /dev/null +++ b/tests/hapi-fhir-base-test-jaxrsserver-kotlin/src/test/resources/logback-test.xml @@ -0,0 +1,30 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} [%file:%line] - %msg%n + + + + + + + + + + + + + + + + + + + + +