Fix android tests

This commit is contained in:
James Agnew 2017-07-30 20:27:02 -04:00
parent e5f6c35aea
commit 72b88849b3
4 changed files with 6 additions and 138 deletions

View File

@ -85,13 +85,6 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>false</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
@ -108,11 +101,8 @@
<includes>
<include>**/*Dstu2ShadeIT.java</include>
</includes>
<additionalClasspathElements>
<additionalClasspathElement>${basedir}/target/hapi-fhir-android-${project.version}-dstu2.jar</additionalClasspathElement>
</additionalClasspathElements>
<classpathDependencyExcludes>
<classpathDependencyExclude>ca.uhn.hapi.fhir:*</classpathDependencyExclude>
<!--<classpathDependencyExclude>ca.uhn.hapi.fhir:*</classpathDependencyExclude>-->
<classpathDependencyExclude>org.codehaus.woodstox:woodstox-core-asl</classpathDependencyExclude>
<classpathDependencyExclude>org.codehaus.woodstox:stax2-api</classpathDependencyExclude>
</classpathDependencyExcludes>
@ -152,130 +142,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<createSourcesJar>true</createSourcesJar>
<shadedArtifactAttached>true</shadedArtifactAttached>
<artifactSet>
<includes combine.children="append">
<include>ca.uhn.hapi.fhir:hapi-fhir-base</include>
<include>ca.uhn.hapi.fhir:hapi-fhir-client-okhttp</include>
<include>org.codehaus.woodstox:woodstox-core-asl</include>
<include>javax.xml.stream:stax-api</include>
<include>org.codehaus.woodstox:stax2-api</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>javax.xml.stream</pattern>
<shadedPattern>ca.uhn.fhir.repackage.javax.xml.stream</shadedPattern>
</relocation>
<relocation>
<pattern>javax.json</pattern>
<shadedPattern>ca.uhn.fhir.repackage.javax.json</shadedPattern>
</relocation>
<relocation>
<pattern>com.ctc.wstx.stax</pattern>
<shadedPattern>ca.uhn.fhir.repackage.com.ctc.wstx.stax</shadedPattern>
</relocation>
</relocations>
<filters combine.children="append">
<!-- Exclude server side stuff, except exceptions which are used clientside -->
<filter>
<artifact>ca.uhn.hapi.fhir:hapi-fhir-base</artifact>
<excludes>
<!-- Exclude test stuff which depends on httpservlet -->
<exclude>ca/uhn/fhir/util/ITestingUiClientFactory</exclude>
<!-- Exclude server side stuff. This could be made nicer if code was divided into shared, server and client -->
<!--exclude>ca/uhn/fhir/rest/server/Add*</exclude>
<exclude>ca/uhn/fhir/rest/server/Apache*</exclude>
<exclude>ca/uhn/fhir/rest/server/Bundle*</exclude>
<exclude>ca/uhn/fhir/rest/server/ETag*</exclude>
<exclude>ca/uhn/fhir/rest/server/Fifo*</exclude>
<exclude>ca/uhn/fhir/rest/server/Hard*</exclude>
<exclude>ca/uhn/fhir/rest/server/IBundle*</exclude>
<exclude>ca/uhn/fhir/rest/server/IDynamic*</exclude>
<exclude>ca/uhn/fhir/rest/server/Incoming*</exclude>
<exclude>ca/uhn/fhir/rest/server/IPaging*</exclude>
<exclude>ca/uhn/fhir/rest/server/IServerAdd*</exclude>
<exclude>ca/uhn/fhir/rest/server/Resource*</exclude>
<exclude>ca/uhn/fhir/rest/server/Rest*</exclude>
<exclude>ca/uhn/fhir/rest/server/Search*</exclude>
<exclude>ca/uhn/fhir/rest/server/Simple*</exclude>
<exclude>ca/uhn/fhir/rest/server/audit/**</exclude>
<exclude>ca/uhn/fhir/rest/server/interceptor/**</exclude-->
<!-- Exclude Phloc validator to make android libs small -->
<exclude>ca/uhn/fhir/validation/schematron/SchematronBaseValidator*</exclude>
<!-- Exclude Thymeleaf to make android libs small -->
<exclude>ca/uhn/fhir/narrative/*Thymeleaf*</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<!-- shaded jar -->
<execution>
<id>shaded</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
<!-- dstu2 jar -->
<execution>
<id>dstu2</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedClassifierName>dstu2</shadedClassifierName>
<artifactSet>
<includes>
<include>ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2</include>
</includes>
</artifactSet>
<!-- Exclude server side stuff, except exceptions which are used clientside -->
<!--filters>
<filter>
<artifact>ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2</artifact>
<excludes>
<exclude>ca/uhn/fhir/rest/server/**</exclude>
</excludes>
</filter>
</filters-->
</configuration>
</execution>
<!-- dstu3 jar -->
<execution>
<id>dstu3</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<shadedClassifierName>dstu3</shadedClassifierName>
<artifactSet>
<includes>
<include>ca.uhn.hapi.fhir:hapi-fhir-structures-dstu3</include>
</includes>
</artifactSet>
<!-- Exclude server side stuff, except exceptions which are used clientside -->
<!--filters>
<filter>
<artifact>ca.uhn.hapi.fhir:hapi-fhir-structures-dstu2</artifact>
<excludes>
<exclude>ca/uhn/fhir/rest/server/**</exclude>
</excludes>
</filter>
</filters-->
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>

View File

@ -39,11 +39,9 @@
<artifactId>hapi-fhir-client</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.4.1</version>
</dependency>
<!-- conformance profile -->

View File

@ -5,7 +5,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import java.util.*;
import java.util.stream.Collectors;
import org.hl7.fhir.r4.model.*;
import org.hl7.fhir.r4.model.Enumerations.AdministrativeGender;

View File

@ -437,6 +437,11 @@
<artifactId>phloc-commons</artifactId>
<version>${phloc_commons_version}</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>