From 0eea7b8f1f93a0360c654609d38b5ae6a1587ff8 Mon Sep 17 00:00:00 2001 From: James Date: Fri, 1 Sep 2017 06:39:55 -0400 Subject: [PATCH] Fix android build hopefully --- hapi-fhir-android/pom.xml | 30 ++----------------- .../ca/uhn/fhir/android/AndroidMarker.java | 20 +++++++++++++ .../dstu3/BaseResourceProviderDstu3Test.java | 2 ++ .../ResponseHighlighterInterceptor.java | 4 +-- .../LoggingInterceptorDstu2Test.java | 2 +- 5 files changed, 27 insertions(+), 31 deletions(-) diff --git a/hapi-fhir-android/pom.xml b/hapi-fhir-android/pom.xml index aff48f24974..7d398328723 100644 --- a/hapi-fhir-android/pom.xml +++ b/hapi-fhir-android/pom.xml @@ -4,9 +4,9 @@ ca.uhn.hapi.fhir - hapi-fhir + hapi-deployable-pom 3.0.0-SNAPSHOT - ../pom.xml + ../hapi-deployable-pom/pom.xml hapi-fhir-android @@ -167,32 +167,6 @@ - - DIST - - - - maven-assembly-plugin - ${maven_assembly_plugin_version} - - - package - - single - - - true - - ${project.basedir}/src/assembly/android-sources.xml - ${project.basedir}/src/assembly/android-javadoc.xml - - - - - - - - diff --git a/hapi-fhir-android/src/main/java/ca/uhn/fhir/android/AndroidMarker.java b/hapi-fhir-android/src/main/java/ca/uhn/fhir/android/AndroidMarker.java index 04b12a8e96c..2f0487f4589 100644 --- a/hapi-fhir-android/src/main/java/ca/uhn/fhir/android/AndroidMarker.java +++ b/hapi-fhir-android/src/main/java/ca/uhn/fhir/android/AndroidMarker.java @@ -1,5 +1,25 @@ package ca.uhn.fhir.android; +/*- + * #%L + * HAPI FHIR - Android + * %% + * Copyright (C) 2014 - 2017 University Health Network + * %% + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * #L% + */ + import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.okhttp.client.OkHttpRestfulClientFactory; diff --git a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/BaseResourceProviderDstu3Test.java b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/BaseResourceProviderDstu3Test.java index 5017d332482..e19e5bd0c17 100644 --- a/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/BaseResourceProviderDstu3Test.java +++ b/hapi-fhir-jpaserver-base/src/test/java/ca/uhn/fhir/jpa/provider/dstu3/BaseResourceProviderDstu3Test.java @@ -64,6 +64,7 @@ public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test { @After public void after() throws Exception { myFhirCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.ONCE); + myDaoConfig.getInterceptors().clear(); } @SuppressWarnings({ "unchecked", "rawtypes" }) @@ -72,6 +73,7 @@ public abstract class BaseResourceProviderDstu3Test extends BaseJpaDstu3Test { myFhirCtx.getRestfulClientFactory().setServerValidationMode(ServerValidationModeEnum.NEVER); myFhirCtx.getRestfulClientFactory().setSocketTimeout(1200 * 1000); myFhirCtx.setParserErrorHandler(new StrictErrorHandler()); + myDaoConfig.getInterceptors().clear(); if (ourServer == null) { ourPort = PortUtil.findFreePort(); diff --git a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java index 518f1f6eb56..d3955dbc71b 100644 --- a/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java +++ b/hapi-fhir-server/src/main/java/ca/uhn/fhir/rest/server/interceptor/ResponseHighlighterInterceptor.java @@ -38,9 +38,9 @@ import static org.apache.commons.lang3.StringUtils.*; * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. diff --git a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptorDstu2Test.java b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptorDstu2Test.java index 572c8d3709f..f491eda0b5d 100644 --- a/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptorDstu2Test.java +++ b/hapi-fhir-structures-dstu2/src/test/java/ca/uhn/fhir/rest/server/interceptor/LoggingInterceptorDstu2Test.java @@ -170,7 +170,7 @@ public class LoggingInterceptorDstu2Test { verify(logger, timeout(1000).times(1)).info(captor.capture()); assertThat(captor.getValue(), startsWith("read - ")); int millis = Integer.parseInt(captor.getValue().substring("read - ".length())); - assertThat(millis, greaterThan(1)); + assertThat(millis, greaterThan(0)); } @Test