Clean up the build and hopefully close #206

This commit is contained in:
James Agnew 2015-08-19 11:49:00 -04:00
parent 3c342c6391
commit 11f5aeebd9
20 changed files with 306 additions and 450 deletions

View File

@ -33,14 +33,8 @@
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
</dependency>
</dependencies> </dependencies>
<reporting> <reporting>

View File

@ -2,14 +2,11 @@ package example;
import java.io.IOException; import java.io.IOException;
import org.junit.Test;
import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.context.FhirContext;
import ca.uhn.fhir.narrative.CustomThymeleafNarrativeGenerator; import ca.uhn.fhir.narrative.CustomThymeleafNarrativeGenerator;
public class NarrativeGenerator { public class NarrativeGenerator {
@Test
public void testGenerator() throws IOException { public void testGenerator() throws IOException {
//START SNIPPET: gen //START SNIPPET: gen

View File

@ -38,24 +38,14 @@
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu</artifactId> <artifactId>hapi-fhir-structures-dstu</artifactId>
<version>1.2-SNAPSHOT</version> <version>1.2-SNAPSHOT</version>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu2</artifactId> <artifactId>hapi-fhir-structures-dstu2</artifactId>
<version>1.2-SNAPSHOT</version> <version>1.2-SNAPSHOT</version>
<optional>true</optional>
</dependency> </dependency>
<!--
<dependency>
<groupId>com.phloc</groupId>
<artifactId>phloc-schematron</artifactId>
<version>${phloc_schematron_version}</version>
</dependency>
<dependency>
<groupId>com.phloc</groupId>
<artifactId>phloc-commons</artifactId>
<version>${phloc_commons_version}</version>
</dependency>
-->
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-android</artifactId> <artifactId>httpclient-android</artifactId>
@ -96,15 +86,6 @@
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<!-- <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId>
<version>${commons_io_version}</version> <scope>test</scope> </dependency> -->
</dependencies> </dependencies>
<build> <build>
@ -148,6 +129,46 @@
<artifactId>maven-shade-plugin</artifactId> <artifactId>maven-shade-plugin</artifactId>
<version>2.3</version> <version>2.3</version>
<executions> <executions>
<execution>
<id>normal</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<createSourcesJar>true</createSourcesJar>
<shadedArtifactAttached>true</shadedArtifactAttached>
<artifactSet>
<includes>
<include>ca.uhn.hapi.fhir:hapi-fhir-base</include>
<include>org.glassfish:javax.json</include>
<include>org.codehaus.woodstox:woodstox-core-asl</include>
<include>javax.xml.stream:stax-api</include>
<include>org.codehaus.woodstox:stax2-api</include>
<include>org.glassfish:javax.json</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>
</relocations>
<filters>
<filter>
<artifact>ca.uhn.hapi.fhir:hapi-fhir-base</artifact>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
<execution> <execution>
<id>dstu</id> <id>dstu</id>
<phase>package</phase> <phase>package</phase>

View File

@ -15,12 +15,6 @@
<name>HAPI FHIR - Minimal Dependency Test - Client</name> <name>HAPI FHIR - Minimal Dependency Test - Client</name>
<dependencies> <dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
</dependency>
<!-- Use an older version of SLF4j --> <!-- Use an older version of SLF4j -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
@ -71,13 +65,6 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>

View File

@ -15,15 +15,10 @@
<name>HAPI FHIR - Minimal Dependency Test - Server</name> <name>HAPI FHIR - Minimal Dependency Test - Server</name>
<dependencies> <dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.mortbay.jetty</groupId> <groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId> <artifactId>jetty</artifactId>
<version>6.1.26</version> <!-- 6.1.26 --> <version>6.1.26</version> <!-- Use an old version -->
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
@ -69,13 +64,6 @@
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>

View File

@ -117,7 +117,6 @@
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
<version>${apache_httpclient_version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>commons-logging</artifactId> <artifactId>commons-logging</artifactId>
@ -128,13 +127,11 @@
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId> <artifactId>httpcore</artifactId>
<version>${apache_httpcore_version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId> <artifactId>spring-beans</artifactId>
<version>${spring_version}</version>
<optional>true</optional> <optional>true</optional>
<exclusions> <exclusions>
<exclusion> <exclusion>
@ -151,14 +148,6 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -1,37 +1,16 @@
package ca.uhn.fhir.rest.client.interceptor; package ca.uhn.fhir.rest.client.interceptor;
/*
* #%L
* HAPI FHIR - Core Library
* %%
* Copyright (C) 2014 - 2015 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 java.io.IOException;
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
import org.apache.http.HttpResponse; import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpRequestBase; import org.apache.http.client.methods.HttpRequestBase;
import ca.uhn.fhir.rest.client.IClientInterceptor; import ca.uhn.fhir.rest.client.IClientInterceptor;
import ca.uhn.fhir.rest.server.Constants; import ca.uhn.fhir.rest.server.Constants;
import net.sourceforge.cobertura.CoverageIgnore;
/** /**
* HTTP interceptor to be used for adding HTTP Authorization using "bearer tokens" to requests. Bearer tokens are used for protocols such as OAUTH2 (see the <a * HTTP interceptor to be used for adding HTTP Authorization using "bearer tokens" to requests. Bearer tokens are used for protocols such as OAUTH2 (see the
* href="http://tools.ietf.org/html/rfc6750">RFC 6750</a> specification on bearer token usage for more information). * <a href="http://tools.ietf.org/html/rfc6750">RFC 6750</a> specification on bearer token usage for more information).
* <p> * <p>
* This interceptor adds a header resembling the following:<br> * This interceptor adds a header resembling the following:<br>
* &nbsp;&nbsp;&nbsp;<code>Authorization: Bearer dsfu9sd90fwp34.erw0-reu</code><br> * &nbsp;&nbsp;&nbsp;<code>Authorization: Bearer dsfu9sd90fwp34.erw0-reu</code><br>
@ -45,19 +24,47 @@ public class BearerTokenAuthInterceptor implements IClientInterceptor {
private String myToken; private String myToken;
/**
* Constructor. If this constructor is used, a token must be supplied later
*/
@CoverageIgnore
public BearerTokenAuthInterceptor() {
// nothing
}
/**
* Constructor
*
* @param theToken
* The bearer token to use (must not be null)
*/
public BearerTokenAuthInterceptor(String theToken) { public BearerTokenAuthInterceptor(String theToken) {
Validate.notNull("theToken must not be null"); Validate.notNull("theToken must not be null");
myToken = theToken; myToken = theToken;
} }
/**
* Returns the bearer token to use
*/
public String getToken() {
return myToken;
}
@Override @Override
public void interceptRequest(HttpRequestBase theRequest) { public void interceptRequest(HttpRequestBase theRequest) {
theRequest.addHeader(Constants.HEADER_AUTHORIZATION, (Constants.HEADER_AUTHORIZATION_VALPREFIX_BEARER + myToken)); theRequest.addHeader(Constants.HEADER_AUTHORIZATION, (Constants.HEADER_AUTHORIZATION_VALPREFIX_BEARER + myToken));
} }
@Override @Override
public void interceptResponse(HttpResponse theResponse) throws IOException { public void interceptResponse(HttpResponse theResponse) {
// nothing // nothing
} }
/**
* Sets the bearer token to use
*/
public void setToken(String theToken) {
myToken = theToken;
}
} }

View File

@ -122,12 +122,6 @@
<version>${jetty_version}</version> <version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>net.sf.json-lib</groupId> <groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId> <artifactId>json-lib</artifactId>
@ -160,12 +154,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>

View File

@ -69,12 +69,6 @@
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.thymeleaf</groupId> <groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId> <artifactId>thymeleaf</artifactId>
@ -117,12 +111,6 @@
<!-- Test Database --> <!-- Test Database -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.apache.derby</groupId> <groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId> <artifactId>derby</artifactId>
@ -134,12 +122,6 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
@ -159,7 +141,6 @@
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId> <artifactId>spring-core</artifactId>
<version>${spring_version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>commons-logging</artifactId> <artifactId>commons-logging</artifactId>
@ -170,12 +151,10 @@
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId> <artifactId>spring-orm</artifactId>
<version>${spring_version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId> <artifactId>spring-context</artifactId>
<version>${spring_version}</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>xml-apis</artifactId> <artifactId>xml-apis</artifactId>
@ -186,17 +165,14 @@
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId> <artifactId>spring-beans</artifactId>
<version>${spring_version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId> <artifactId>spring-tx</artifactId>
<version>${spring_version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId> <artifactId>spring-context-support</artifactId>
<version>${spring_version}</version>
</dependency> </dependency>
<!-- Hibernate --> <!-- Hibernate -->

View File

@ -1,11 +1,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<!-- Note: HAPI projects use the "hapi-fhir" POM as their base to provide <!-- Note: HAPI projects use the "hapi-fhir" POM as their base to provide easy management. You do not need to use this in your own projects, so the "parent" tag and it's contents below may be removed
easy management. You do not need to use this in your own projects, so the if you are using this file as a basis for your own project. -->
"parent" tag and it's contents below may be removed if you are using this
file as a basis for your own project. -->
<parent> <parent>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir</artifactId> <artifactId>hapi-fhir</artifactId>
@ -50,8 +47,7 @@
<version>1.2-SNAPSHOT</version> <version>1.2-SNAPSHOT</version>
</dependency> </dependency>
<!-- This dependency includes the JPA server itself, which is packaged <!-- This dependency includes the JPA server itself, which is packaged separately from the rest of HAPI FHIR -->
separately from the rest of HAPI FHIR -->
<dependency> <dependency>
<groupId>ca.uhn.hapi.fhir</groupId> <groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-base</artifactId> <artifactId>hapi-fhir-jpaserver-base</artifactId>
@ -67,10 +63,8 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- HAPI-FHIR uses Logback for logging support. The logback library is <!-- HAPI-FHIR uses Logback for logging support. The logback library is included automatically by Maven as a part of the hapi-fhir-base dependency, but you also need to include a logging library. Logback
included automatically by Maven as a part of the hapi-fhir-base dependency, is used here, but log4j would also be fine. -->
but you also need to include a logging library. Logback is used here, but
log4j would also be fine. -->
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
@ -83,8 +77,7 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- If you are using HAPI narrative generation, you will need to include <!-- If you are using HAPI narrative generation, you will need to include Thymeleaf as well. Otherwise the following can be omitted. -->
Thymeleaf as well. Otherwise the following can be omitted. -->
<dependency> <dependency>
<groupId>org.thymeleaf</groupId> <groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId> <artifactId>thymeleaf</artifactId>
@ -112,17 +105,14 @@
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<!-- You may not need this if you are deploying to an application server <!-- You may not need this if you are deploying to an application server which provides database connection pools itself. -->
which provides database connection pools itself. -->
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId> <artifactId>commons-dbcp2</artifactId>
</dependency> </dependency>
<!-- This example uses Derby embedded database. If you are using another <!-- This example uses Derby embedded database. If you are using another database such as Mysql or Oracle, you may omit the following dependencies and replace them with an appropriate database client
database such as Mysql or Oracle, you may omit the following dependencies dependency for your database platform. -->
and replace them with an appropriate database client dependency for your
database platform. -->
<dependency> <dependency>
<groupId>org.apache.derby</groupId> <groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId> <artifactId>derby</artifactId>
@ -136,15 +126,7 @@
<artifactId>derbyclient</artifactId> <artifactId>derbyclient</artifactId>
</dependency> </dependency>
<!-- <!-- The following dependencies are only needed for automated unit tests, you do not neccesarily need them to run the example. -->
The following dependencies are only needed for automated unit tests,
you do not neccesarily need them to run the example.
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId> <artifactId>jetty-servlets</artifactId>
@ -178,8 +160,7 @@
<!-- Tells Maven to name the generated WAR file as hapi-fhir-jpaserver-example.war --> <!-- Tells Maven to name the generated WAR file as hapi-fhir-jpaserver-example.war -->
<finalName>hapi-fhir-jpaserver-example</finalName> <finalName>hapi-fhir-jpaserver-example</finalName>
<!-- The following is not required for the application to build, but allows <!-- The following is not required for the application to build, but allows you to test it by issuing "mvn jetty:run" from the command line. -->
you to test it by issuing "mvn jetty:run" from the command line. -->
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<plugin> <plugin>
@ -205,8 +186,7 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- The configuration here tells the WAR plugin to include the FHIR Tester <!-- The configuration here tells the WAR plugin to include the FHIR Tester overlay. You can omit it if you are not using that feature. -->
overlay. You can omit it if you are not using that feature. -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
@ -220,8 +200,7 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- This plugin is just a part of the HAPI internal build process, you <!-- This plugin is just a part of the HAPI internal build process, you do not need to incude it in your own projects -->
do not need to incude it in your own projects -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>maven-deploy-plugin</artifactId>
@ -230,6 +209,22 @@
</configuration> </configuration>
</plugin> </plugin>
<!-- This is to run the integration tests -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>

View File

@ -1,7 +1,8 @@
package ca.uhn.fhir.jpa.dao; package ca.uhn.fhir.jpa.demo;
import static org.junit.Assert.*; import static org.junit.Assert.*;
import java.io.File;
import java.io.IOException; import java.io.IOException;
import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.Server;
@ -17,10 +18,12 @@ import ca.uhn.fhir.rest.client.IGenericClient;
import ca.uhn.fhir.rest.client.ServerValidationModeEnum; import ca.uhn.fhir.rest.client.ServerValidationModeEnum;
import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor;
public class ResourceProviderDstu2Test { public class ExampleServerIT {
private static IGenericClient ourClient; private static IGenericClient ourClient;
private static final FhirContext ourCtx = FhirContext.forDstu2(); private static final FhirContext ourCtx = FhirContext.forDstu2();
private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(ExampleServerIT.class);
private static int ourPort; private static int ourPort;
private static Server ourServer; private static Server ourServer;
@ -44,13 +47,23 @@ public class ResourceProviderDstu2Test {
@BeforeClass @BeforeClass
public static void beforeClass() throws Exception { public static void beforeClass() throws Exception {
/*
* This runs under maven, and I'm not sure how else to figure out the target directory from code..
*/
String path = ExampleServerIT.class.getClassLoader().getResource("whereami.txt").getPath();
path = new File(path).getParent();
path = new File(path).getParent();
path = new File(path).getParent();
ourLog.info("Project base path is: {}", path);
ourPort = RandomServerPortProvider.findFreePort(); ourPort = RandomServerPortProvider.findFreePort();
ourServer = new Server(ourPort); ourServer = new Server(ourPort);
WebAppContext webAppContext = new WebAppContext(); WebAppContext webAppContext = new WebAppContext();
webAppContext.setContextPath("/"); webAppContext.setContextPath("/");
webAppContext.setDescriptor("src/main/webapp/WEB-INF/web.xml"); webAppContext.setDescriptor(path + "/src/main/webapp/WEB-INF/web.xml");
webAppContext.setResourceBase("target/hapi-fhir-jpaserver-example"); webAppContext.setResourceBase(path + "/target/hapi-fhir-jpaserver-example");
webAppContext.setParentLoaderPriority(true); webAppContext.setParentLoaderPriority(true);
ourServer.setHandler(webAppContext); ourServer.setHandler(webAppContext);

View File

@ -1,4 +1,4 @@
package ca.uhn.fhir.jpa.dao; package ca.uhn.fhir.jpa.demo;
import java.io.IOException; import java.io.IOException;
import java.net.ServerSocket; import java.net.ServerSocket;

View File

@ -0,0 +1 @@
ust used for path resolution

View File

@ -1,5 +1,4 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
@ -28,12 +27,6 @@
</dependency> </dependency>
<!-- Testing --> <!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>xmlunit</groupId> <groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId> <artifactId>xmlunit</artifactId>
@ -43,43 +36,36 @@
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId> <artifactId>jetty-servlets</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId> <artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId> <artifactId>jetty-server</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId> <artifactId>jetty-util</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId> <artifactId>jetty-webapp</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId> <artifactId>jetty-http</artifactId>
<version>${jetty_version}</version> <scope>test</scope>
<scope>test</scope> </dependency>
</dependency> <dependency>
<dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>${logback_version}</version>
<optional>true</optional> <optional>true</optional>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
@ -96,26 +82,20 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.phloc</groupId> <groupId>com.phloc</groupId>
<artifactId>phloc-schematron</artifactId> <artifactId>phloc-schematron</artifactId>
<version>${phloc_schematron_version}</version> <version>${phloc_schematron_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.phloc</groupId> <groupId>com.phloc</groupId>
<artifactId>phloc-commons</artifactId> <artifactId>phloc-commons</artifactId>
<version>${phloc_commons_version}</version> <version>${phloc_commons_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- UNIT TEST DEPENDENCIES --> <!-- UNIT TEST DEPENDENCIES -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>net.sf.json-lib</groupId> <groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId> <artifactId>json-lib</artifactId>
@ -148,38 +128,15 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
<version>${guava_version}</version> <version>${guava_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- <!-- <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-web</artifactId> <version>${spring_security_version}</version> <scope>test</scope> </dependency> <dependency>
<dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-config</artifactId> <version>${spring_security_version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.security</groupId>
<groupId>org.springframework.security</groupId> <artifactId>spring-security-jwt</artifactId> <version>1.0.2.RELEASE</version> <scope>test</scope> </dependency> -->
<artifactId>spring-security-web</artifactId>
<version>${spring_security_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring_security_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-jwt</artifactId>
<version>1.0.2.RELEASE</version>
<scope>test</scope>
</dependency>
-->
</dependencies> </dependencies>
@ -269,7 +226,7 @@
</plugins> </plugins>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--> <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
<plugin> <plugin>
<groupId>org.eclipse.m2e</groupId> <groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId> <artifactId>lifecycle-mapping</artifactId>

View File

@ -30,12 +30,6 @@
<!-- Testing --> <!-- Testing -->
<!-- <dependency> <groupId>ca.uhn.hapi.fhir</groupId> <artifactId>hapi-fhir-structures-dstu</artifactId> <!-- <dependency> <groupId>ca.uhn.hapi.fhir</groupId> <artifactId>hapi-fhir-structures-dstu</artifactId>
<version>0.8</version> <scope>test</scope> </dependency> --> <version>0.8</version> <scope>test</scope> </dependency> -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>xmlunit</groupId> <groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId> <artifactId>xmlunit</artifactId>
@ -45,37 +39,31 @@
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId> <artifactId>jetty-servlets</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId> <artifactId>jetty-server</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId> <artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId> <artifactId>jetty-util</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId> <artifactId>jetty-webapp</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId> <artifactId>jetty-http</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
@ -112,11 +100,6 @@
<!-- UNIT TEST DEPENDENCIES --> <!-- UNIT TEST DEPENDENCIES -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>net.sf.json-lib</groupId> <groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId> <artifactId>json-lib</artifactId>
@ -149,12 +132,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>

View File

@ -49,12 +49,6 @@
</dependency> </dependency>
<!-- Testing --> <!-- Testing -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>xmlunit</groupId> <groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId> <artifactId>xmlunit</artifactId>
@ -64,43 +58,36 @@
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId> <artifactId>jetty-servlets</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId> <artifactId>jetty-servlet</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId> <artifactId>jetty-server</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId> <artifactId>jetty-util</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-webapp</artifactId> <artifactId>jetty-webapp</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId> <artifactId>jetty-http</artifactId>
<version>${jetty_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>${logback_version}</version>
<optional>true</optional> <optional>true</optional>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
@ -131,12 +118,6 @@
<!-- UNIT TEST DEPENDENCIES --> <!-- UNIT TEST DEPENDENCIES -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>net.sf.json-lib</groupId> <groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId> <artifactId>json-lib</artifactId>
@ -169,12 +150,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>

View File

@ -38,29 +38,14 @@
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>${servlet_api_version}</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>${logback_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId> <artifactId>jetty-servlets</artifactId>

View File

@ -63,7 +63,6 @@
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
@ -77,29 +76,8 @@
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<version>${logback_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>${hamcrest_version}</version>
<scope>test</scope>
</dependency>
<!--
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.16-SNAPSHOT</version>
<scope>test</scope>
</dependency>
-->
<!-- Database --> <!-- Database -->
<dependency> <dependency>
@ -113,10 +91,8 @@
<dependency> <dependency>
<groupId>org.apache.derby</groupId> <groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId> <artifactId>derby</artifactId>
<version>${derby_version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<!-- <dependency> <groupId>org.hsqldb</groupId> <artifactId>hsqldb</artifactId> <version>2.3.2</version> </dependency> -->
<!-- Spring --> <!-- Spring -->
<dependency> <dependency>
@ -127,12 +103,10 @@
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId> <artifactId>spring-core</artifactId>
<version>${spring_version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId> <artifactId>spring-orm</artifactId>
<version>${spring_version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>

282
pom.xml
View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent> <parent>
<groupId>org.sonatype.oss</groupId> <groupId>org.sonatype.oss</groupId>
@ -45,29 +44,47 @@
</description> </description>
<dependencies> <dependencies>
<!-- <!-- Cobertura is here as a 'provided' depdendency just to get the @CoverageIgnore annotation. It would be nice if there was a better way for this.. -->
Cobertura is here as a 'provided' depdendency just to get the <dependency>
@CoverageIgnore annotation. It would be nice if there was a better way <groupId>net.sourceforge.cobertura</groupId>
for this.. <artifactId>cobertura</artifactId>
--> <version>2.1.1</version>
<dependency> <scope>provided</scope>
<groupId>net.sourceforge.cobertura</groupId> <exclusions>
<artifactId>cobertura</artifactId> <exclusion>
<version>2.1.1</version> <artifactId>jetty</artifactId>
<scope>provided</scope> <groupId>org.mortbay.jetty</groupId>
<exclusions> </exclusion>
<exclusion> </exclusions>
<artifactId>jetty</artifactId> </dependency>
<groupId>org.mortbay.jetty</groupId> <dependency>
</exclusion> <groupId>junit</groupId>
</exclusions> <artifactId>junit</artifactId>
</dependency> <version>4.12</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>hamcrest-core</artifactId>
<groupId>org.hamcrest</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<prerequisites> <prerequisites>
<!-- TODO: the version number here should probably be either 3.2 or 3.3. <maven>3.2</maven>
Check and fix -->
<maven>3.0.1</maven>
</prerequisites> </prerequisites>
<developers> <developers>
@ -171,9 +188,7 @@
</licenses> </licenses>
<properties> <properties>
<!-- This property is used in some of the site documentation where the <!-- This property is used in some of the site documentation where the version is shown, so that we can deploy the site even if the project is on a snapshot version. -->
version is shown, so that we can deploy the site even if the project is on
a snapshot version. -->
<hapi_stable_version>1.1</hapi_stable_version> <hapi_stable_version>1.1</hapi_stable_version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -190,17 +205,12 @@
<commons_codec_version>1.10</commons_codec_version> <commons_codec_version>1.10</commons_codec_version>
<derby_version>10.11.1.1</derby_version> <derby_version>10.11.1.1</derby_version>
<guava_version>18.0</guava_version> <guava_version>18.0</guava_version>
<hamcrest_version>2.0.0.0</hamcrest_version> <!-- Note on Hibernate versions: Hibernate 4.3+ uses JPA 2.1, which is too new for a number of platforms including JBoss EAP 6.x and Glassfish 3.0. Upgrade this version with caution! Also note that if
<!-- Note on Hibernate versions: Hibernate 4.3+ uses JPA 2.1, which is you change this, you may get a failure in hibernate4-maven-plugin. See the note in hapi-fhir-jpaserver-base/pom.xml's configuration for that plugin... <hibernate_version>4.3.7.Final</hibernate_version> -->
too new for a number of platforms including JBoss EAP 6.x and Glassfish 3.0.
Upgrade this version with caution! Also note that if you change this, you
may get a failure in hibernate4-maven-plugin. See the note in hapi-fhir-jpaserver-base/pom.xml's
configuration for that plugin... <hibernate_version>4.3.7.Final</hibernate_version> -->
<hibernate_version>4.2.17.Final</hibernate_version> <hibernate_version>4.2.17.Final</hibernate_version>
<hibernate_validator_version>5.1.0.Final</hibernate_validator_version> <hibernate_validator_version>5.1.0.Final</hibernate_validator_version>
<jetty_version>9.2.6.v20141205</jetty_version> <jetty_version>9.2.6.v20141205</jetty_version>
<jscience_version>4.3.1</jscience_version> <jscience_version>4.3.1</jscience_version>
<junit_version>4.12</junit_version>
<logback_version>1.1.2</logback_version> <logback_version>1.1.2</logback_version>
<maven_antrun_plugin_version>1.8</maven_antrun_plugin_version> <maven_antrun_plugin_version>1.8</maven_antrun_plugin_version>
<maven_build_helper_plugin_version>1.9.1</maven_build_helper_plugin_version> <maven_build_helper_plugin_version>1.9.1</maven_build_helper_plugin_version>
@ -215,7 +225,6 @@
<maven_site_plugin_version>3.4</maven_site_plugin_version> <maven_site_plugin_version>3.4</maven_site_plugin_version>
<maven_source_plugin_version>2.4</maven_source_plugin_version> <maven_source_plugin_version>2.4</maven_source_plugin_version>
<mitreid-connect-version>1.1.8</mitreid-connect-version> <mitreid-connect-version>1.1.8</mitreid-connect-version>
<mockito_version>1.10.17</mockito_version>
<phloc_schematron_version>2.7.1</phloc_schematron_version> <phloc_schematron_version>2.7.1</phloc_schematron_version>
<phloc_commons_version>4.3.6</phloc_commons_version> <phloc_commons_version>4.3.6</phloc_commons_version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@ -242,11 +251,6 @@
<artifactId>javax.servlet-api</artifactId> <artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
</dependency> </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId> <artifactId>commons-dbcp2</artifactId>
@ -267,6 +271,21 @@
<artifactId>derbyclient</artifactId> <artifactId>derbyclient</artifactId>
<version>${derby_version}</version> <version>${derby_version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>9.2.6.v20141205</version>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId> <artifactId>jetty-servlets</artifactId>
@ -293,9 +312,34 @@
<version>9.2.6.v20141205</version> <version>9.2.6.v20141205</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.springframework</groupId>
<artifactId>mockito-all</artifactId> <artifactId>spring-beans</artifactId>
<version>1.10.19</version> <version>${spring_version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring_version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring_version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring_version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring_version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring_version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
@ -331,15 +375,45 @@
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.18.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>random</runOrder>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>2.6</version> <version>2.6</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>maven-deploy-plugin</artifactId> <artifactId>animal-sniffer-maven-plugin</artifactId>
<version>2.8.2</version> <version>1.14</version>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
@ -349,6 +423,15 @@
<skip>true</skip> <skip>true</skip>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.8</version>
<configuration>
<verbose>true</verbose>
<addSvnKeyWords>false</addSvnKeyWords>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId> <artifactId>jetty-maven-plugin</artifactId>
@ -363,48 +446,8 @@
</coberturaReports> </coberturaReports>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven_surefire_plugin_version}</version>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<runOrder>random</runOrder>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.14</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven_javadoc_plugin_version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${maven_source_plugin_version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${maven_license_plugin_version}</version>
<configuration>
<verbose>true</verbose>
<addSvnKeyWords>false</addSvnKeyWords>
</configuration>
</plugin>
<plugin> <plugin>
<artifactId>maven-site-plugin</artifactId> <artifactId>maven-site-plugin</artifactId>
<version>${maven_site_plugin_version}</version>
<configuration> <configuration>
<skip>false</skip> <skip>false</skip>
<skipDeploy>true</skipDeploy> <skipDeploy>true</skipDeploy>
@ -450,8 +493,7 @@
</dependency> </dependency>
</dependencies> </dependencies>
</plugin> </plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
only. It has no influence on the Maven build itself. -->
<plugin> <plugin>
<groupId>org.eclipse.m2e</groupId> <groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId> <artifactId>lifecycle-mapping</artifactId>
@ -562,6 +604,11 @@
<artifactId>maven-install-plugin</artifactId> <artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version> <version>2.5.2</version>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.4</version>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
<plugins> <plugins>
@ -596,46 +643,45 @@
<configuration> <configuration>
<target> <target>
<copy todir="target/site/apidocs"> <copy todir="target/site/apidocs">
<fileset dir="hapi-fhir-base/target/site/apidocs" /> <fileset dir="hapi-fhir-base/target/site/apidocs"/>
</copy> </copy>
<copy todir="target/site/apidocs-dstu"> <copy todir="target/site/apidocs-dstu">
<fileset dir="hapi-fhir-structures-dstu/target/site/apidocs" /> <fileset dir="hapi-fhir-structures-dstu/target/site/apidocs"/>
</copy> </copy>
<copy todir="target/site/apidocs-hl7org-dstu2"> <copy todir="target/site/apidocs-hl7org-dstu2">
<fileset <fileset dir="hapi-fhir-structures-hl7org-dstu2/target/site/apidocs"/>
dir="hapi-fhir-structures-hl7org-dstu2/target/site/apidocs" />
</copy> </copy>
<copy todir="target/site/apidocs-dstu2"> <copy todir="target/site/apidocs-dstu2">
<fileset dir="hapi-fhir-structures-dstu2/target/site/apidocs" /> <fileset dir="hapi-fhir-structures-dstu2/target/site/apidocs"/>
</copy> </copy>
<copy todir="target/site/apidocs-jpaserver"> <copy todir="target/site/apidocs-jpaserver">
<fileset dir="hapi-fhir-jpaserver-base/target/site/apidocs" /> <fileset dir="hapi-fhir-jpaserver-base/target/site/apidocs"/>
</copy> </copy>
<copy todir="target/site/xref-jpaserver"> <copy todir="target/site/xref-jpaserver">
<fileset dir="hapi-fhir-jpaserver-base/target/site/xref" /> <fileset dir="hapi-fhir-jpaserver-base/target/site/xref"/>
</copy> </copy>
<copy todir="target/site/xref-base"> <copy todir="target/site/xref-base">
<fileset dir="hapi-fhir-base/target/site/xref" /> <fileset dir="hapi-fhir-base/target/site/xref"/>
</copy> </copy>
<copy todir="target/site/cobertura"> <copy todir="target/site/cobertura">
<fileset dir="hapi-fhir-cobertura/target/site/cobertura" /> <fileset dir="hapi-fhir-cobertura/target/site/cobertura"/>
</copy> </copy>
<copy todir="target/site"> <copy todir="target/site">
<fileset dir="hapi-fhir-base/target/site" includes="checkstyle.*" /> <fileset dir="hapi-fhir-base/target/site" includes="checkstyle.*"/>
</copy> </copy>
<echo>Fixing Checkstyle Report</echo> <echo>Fixing Checkstyle Report</echo>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="checkstyle.html" /> <include name="checkstyle.html"/>
<replacetoken>"../../</replacetoken> <replacetoken>"../../</replacetoken>
<replacevalue>"./</replacevalue> <replacevalue>"./</replacevalue>
</replace> </replace>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="*.html" /> <include name="*.html"/>
<replacetoken>http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css</replacetoken> <replacetoken>http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-responsive.min.css</replacetoken>
<replacevalue>./css/bootstrap-responsive.min.css</replacevalue> <replacevalue>./css/bootstrap-responsive.min.css</replacevalue>
</replace> </replace>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="index.html" /> <include name="index.html"/>
<replacetoken><![CDATA[<h2 id="Welcome">Welcome</h2>]]></replacetoken> <replacetoken><![CDATA[<h2 id="Welcome">Welcome</h2>]]></replacetoken>
<replacevalue><![CDATA[<div class="jumbotron subhead"> <replacevalue><![CDATA[<div class="jumbotron subhead">
<div class="row" id="banner"> <div class="row" id="banner">
@ -650,8 +696,7 @@
</div> </div>
</div>]]></replacevalue> </div>]]></replacevalue>
</replace> </replace>
<!--<replaceregexp file="target/site/checkstyle.html" byline="false" <!--<replaceregexp file="target/site/checkstyle.html" byline="false" match="&lt;ul class=&quot;breadcrumb.*?&lt;/ul&gt;" replace="" flags="s"/> -->
match="&lt;ul class=&quot;breadcrumb.*?&lt;/ul&gt;" replace="" flags="s"/> -->
</target> </target>
</configuration> </configuration>
</execution> </execution>
@ -665,33 +710,33 @@
<target> <target>
<echo>Adding Fontawesome</echo> <echo>Adding Fontawesome</echo>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="*.html" /> <include name="*.html"/>
<replacetoken><![CDATA[<a href="download.html" title="Download">Download</a>]]></replacetoken> <replacetoken><![CDATA[<a href="download.html" title="Download">Download</a>]]></replacetoken>
<replacevalue><![CDATA[<a href="download.html" title="Download"><i class="fa fa-download"></i> Download</a>]]></replacevalue> <replacevalue><![CDATA[<a href="download.html" title="Download"><i class="fa fa-download"></i> Download</a>]]></replacevalue>
</replace> </replace>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="*.html" /> <include name="*.html"/>
<replacetoken><![CDATA[<a href="https://github.com/jamesagnew/hapi-fhir/" title="GitHub Project" class="externalLink">GitHub Project</a>]]></replacetoken> <replacetoken><![CDATA[<a href="https://github.com/jamesagnew/hapi-fhir/" title="GitHub Project" class="externalLink">GitHub Project</a>]]></replacetoken>
<replacevalue><![CDATA[<a href="https://github.com/jamesagnew/hapi-fhir/" title="GitHub Project" class="externalLink"><i class="fa fa-github"></i> GitHub Project</a>]]></replacevalue> <replacevalue><![CDATA[<a href="https://github.com/jamesagnew/hapi-fhir/" title="GitHub Project" class="externalLink"><i class="fa fa-github"></i> GitHub Project</a>]]></replacevalue>
</replace> </replace>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="*.html" /> <include name="*.html"/>
<replacetoken><![CDATA[data-toggle="dropdown">Test Servers <]]></replacetoken> <replacetoken><![CDATA[data-toggle="dropdown">Test Servers <]]></replacetoken>
<replacevalue><![CDATA[data-toggle="dropdown"><i class="fa fa-fire"></i>&nbsp;Test Servers&nbsp;<]]></replacevalue> <replacevalue><![CDATA[data-toggle="dropdown"><i class="fa fa-fire"></i>&nbsp;Test Servers&nbsp;<]]></replacevalue>
</replace> </replace>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="*.html" /> <include name="*.html"/>
<replacetoken><![CDATA[data-toggle="dropdown">Documentation <]]></replacetoken> <replacetoken><![CDATA[data-toggle="dropdown">Documentation <]]></replacetoken>
<replacevalue><![CDATA[data-toggle="dropdown"><i class="fa fa-book"></i>&nbsp;Documentation&nbsp;<]]></replacevalue> <replacevalue><![CDATA[data-toggle="dropdown"><i class="fa fa-book"></i>&nbsp;Documentation&nbsp;<]]></replacevalue>
</replace> </replace>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="*.html" /> <include name="*.html"/>
<replacetoken><![CDATA[data-toggle="dropdown">Get Help <]]></replacetoken> <replacetoken><![CDATA[data-toggle="dropdown">Get Help <]]></replacetoken>
<replacevalue><![CDATA[data-toggle="dropdown"><i class="fa fa-support"></i>&nbsp;Get Help&nbsp;<]]></replacevalue> <replacevalue><![CDATA[data-toggle="dropdown"><i class="fa fa-support"></i>&nbsp;Get Help&nbsp;<]]></replacevalue>
</replace> </replace>
<echo>Changing Breadcrumbs</echo> <echo>Changing Breadcrumbs</echo>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="doc_*.html" /> <include name="doc_*.html"/>
<replacetoken><![CDATA[<li class="divider">/</li>]]></replacetoken> <replacetoken><![CDATA[<li class="divider">/</li>]]></replacetoken>
<replacevalue><![CDATA[<li class="divider">/</li> <replacevalue><![CDATA[<li class="divider">/</li>
<li><a href="docindex.html" title="Documentation">Documentation</a></li> <li><a href="docindex.html" title="Documentation">Documentation</a></li>
@ -742,8 +787,8 @@
<echo>Adding Google analytics in target/site for &lt;body&gt;</echo> <echo>Adding Google analytics in target/site for &lt;body&gt;</echo>
<replace dir="target/site" summary="true"> <replace dir="target/site" summary="true">
<include name="**/*.html"></include> <include name="**/*.html"></include>
<replacefilter token="#build#" value="${label}" /> <replacefilter token="#build#" value="${label}"/>
<replacefilter token="#version#" value="${project.version}" /> <replacefilter token="#version#" value="${project.version}"/>
<replacetoken><![CDATA[</body>]]></replacetoken> <replacetoken><![CDATA[</body>]]></replacetoken>
<replacevalue><![CDATA[ <replacevalue><![CDATA[
<script> <script>
@ -792,7 +837,6 @@
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId> <artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.11</version>
<inherited>true</inherited> <inherited>true</inherited>
<configuration> <configuration>
<signature> <signature>
@ -845,11 +889,8 @@
<reporting> <reporting>
<plugins> <plugins>
<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <reportSets> <reportSet> <reports><report>checkstyle-aggregate</report></reports> </reportSet>
<reportSets> <reportSet> <reports><report>checkstyle-aggregate</report></reports> </reportSets> <configuration> <configLocation>config/sun_checks.xml</configLocation> <includes> hapi-fhir-base/src/main/java/**/*.java </includes> </configuration> </plugin> -->
</reportSet> </reportSets> <configuration> <configLocation>config/sun_checks.xml</configLocation>
<includes> hapi-fhir-base/src/main/java/**/*.java </includes> </configuration>
</plugin> -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-changes-plugin</artifactId> <artifactId>maven-changes-plugin</artifactId>
@ -873,7 +914,7 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId> <artifactId>maven-surefire-report-plugin</artifactId>
<version>${maven_surefire_plugin_version}</version> <version>2.18.1</version>
<reportSets> <reportSets>
<reportSet> <reportSet>
<reports> <reports>
@ -906,8 +947,7 @@
</reportSet> </reportSet>
</reportSets> </reportSets>
</plugin> </plugin>
<!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-linkcheck-plugin</artifactId> <!-- <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-linkcheck-plugin</artifactId> <version>1.1</version> </plugin> -->
<version>1.1</version> </plugin> -->
</plugins> </plugins>
</reporting> </reporting>
@ -925,10 +965,8 @@
</modules> </modules>
<build> <build>
<plugins> <plugins>
<!-- <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>${maven_assembly_plugin_version}</version> <!-- <plugin> <artifactId>maven-assembly-plugin</artifactId> <version>${maven_assembly_plugin_version}</version> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals>
<executions> <execution> <phase>package</phase> <goals> <goal>single</goal> <configuration> <attach>false</attach> <descriptors> <descriptor>${project.basedir}/src/assembly/hapi-fhir-sample-projects.xml</descriptor> </descriptors> </configuration> </execution> </executions> </plugin> -->
</goals> <configuration> <attach>false</attach> <descriptors> <descriptor>${project.basedir}/src/assembly/hapi-fhir-sample-projects.xml</descriptor>
</descriptors> </configuration> </execution> </executions> </plugin> -->
</plugins> </plugins>
</build> </build>

View File

@ -31,12 +31,6 @@
<version>${logback_version}</version> <version>${logback_version}</version>
<optional>true</optional> <optional>true</optional>
</dependency> </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit_version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId> <artifactId>jetty-servlets</artifactId>