| POM: |
Show
hide
<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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>gov.hhs.cms.bluebutton.fhir</groupId>
<artifactId>bluebutton-server-parent</artifactId>
<version>1.0.0-4</version>
</parent>
<artifactId>bluebutton-server-app</artifactId>
<packaging>war</packaging>
<description>
The primary WAR for the CMS Blue Button API project. Provides a FHIR API.
</description>
<properties>
<hapi-fhir.version>2.0</hapi-fhir.version>
<jersey.version>2.23.1</jersey.version>
</properties>
<dependencies>
<!-- This dependency includes the core HAPI-FHIR classes -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-base</artifactId>
<version>${hapi-fhir.version}</version>
</dependency>
<!-- At least one "structures" JAR must also be included -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-structures-dstu3</artifactId>
<version>${hapi-fhir.version}</version>
</dependency>
<!-- This dependency includes the JPA server itself, which is packaged
separately from the rest of HAPI FHIR -->
<dependency>
<groupId>ca.uhn.hapi.fhir</groupId>
<artifactId>hapi-fhir-jpaserver-base</artifactId>
<version>${hapi-fhir.version}</version>
</dependency>
<dependency>
<!-- 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 is used here, but
log4j would also be fine. -->
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<!-- Needed for JEE/Servlet support -->
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<!-- If you are using HAPI narrative generation, you will need to include
Thymeleaf as well. Otherwise the following can be omitted. -->
<groupId>org.thymeleaf</groupId>
<artifactId>thymeleaf</artifactId>
<version>3.0.1.RELEASE</version>
</dependency>
<dependency>
<!-- Used for CORS support -->
<groupId>org.ebaysf.web</groupId>
<artifactId>cors-filter</artifactId>
<version>1.0.1</version>
<exclusions>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<!-- Spring Web is used to deploy the server to a web container. -->
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.3.1.RELEASE</version>
</dependency>
<dependency>
<!-- You may not need this if you are deploying to an application server
which provides database connection pools itself. -->
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<!-- The Blue Button API runs against PostgreSQL in production. -->
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4-1206-jdbc42</version>
</dependency>
<dependency>
<!-- The builds for this and other Blue Button API projects use HSQL in
tests. -->
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.2.4</version>
</dependency>
<dependency>
<!-- The test framework used for unit and integration tests. -->
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.phloc</groupId>
<artifactId>phloc-schematron</artifactId>
<version>2.7.1</version>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<!-- When its 'attach-artifact' goal is run, this plugin will attach
the server management scripts that should be used to run this project's WAR.
This ensures that it is included in install, deploy, etc. operations. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.12</version>
<configuration>
<artifacts>
<artifact>
<file>src/main/config/server-config.sh</file>
<type>sh</type>
<classifier>server-config</classifier>
</artifact>
<artifact>
<file>src/main/config/server-config-healthapt.sh</file>
<type>sh</type>
<classifier>server-config-healthapt</classifier>
</artifact>
<artifact>
<file>src/main/config/server-start.sh</file>
<type>sh</type>
<classifier>server-start</classifier>
</artifact>
<artifact>
<file>src/main/config/server-stop.sh</file>
<type>sh</type>
<classifier>server-stop</classifier>
</artifact>
</artifacts>
</configuration>
</plugin>
<plugin>
<!-- Configure the dependency plugin such that it can be used to grab
the test dependency artifacts, for manual testing or for use in integration
tests. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<configuration>
<artifactItems>
<artifactItem>
<!-- Wildfly 8.1 is the upstream release that JBoss EAP 7 is based
on. Though our application will run in JBoss EAP in production, we test it
against Wildfly here because Wildfly is available for unauthenticated download
(and JBoss EAP isn't). -->
<groupId>org.wildfly</groupId>
<artifactId>wildfly-dist</artifactId>
<version>8.1.0.Final</version>
<type>tar.gz</type>
<outputDirectory>${project.build.directory}/bluebutton-server</outputDirectory>
</artifactItem>
</artifactItems>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>true</overWriteSnapshots>
</configuration>
</plugin>
<plugin>
<!-- When its `run` goal is run, this plugin will copy the files in
`src/main/config` and the WAR to the `target/bluebutton-server` directory. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<configuration>
<target>
<mkdir dir="${project.build.directory}/bluebutton-server" />
<copy file="${project.build.directory}/${project.build.finalName}.war"
tofile="${project.build.directory}/bluebutton-server/${artifactId}.war" />
<copy todir="${project.build.directory}/bluebutton-server">
<resources>
<file file="src/main/config/server-config.sh" />
<file file="src/main/config/server-start.sh" />
<file file="src/main/config/server-stop.sh" />
</resources>
<globmapper from="*.sh" to="${artifactId}-*.sh" />
</copy>
<chmod perm="a+x">
<fileset dir="${project.build.directory}/bluebutton-server">
<include name="*.sh" />
</fileset>
</chmod>
</target>
</configuration>
</plugin>
<plugin>
<!-- The exec plugin can be used in child modules to run the 'dev/bluebutton-fhir-server-*.sh'
scripts, which will start and stop the Blue Button API FHIR server for use
in testing. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<!-- Attach the config files that should be used to run this project's
WAR. This ensures that they are included in Maven install, deploy, etc. operations. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webXml>src/main/webapp/WEB-INF/web.xml</webXml>
</configuration>
</plugin>
<plugin>
<!-- Use the dependency plugin to copy the test dependency artifacts,
for use in ITs. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>server-copy-artifacts</id>
<phase>pre-integration-test</phase>
<goals>
<goal>copy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Copy the files in `src/main/config` and the WAR to the `target/bluebutton-server`
directory. This will be used by the exec plugin execution below. -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>server-copy-files</id>
<phase>pre-integration-test</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Launch a Java web server hosting the Blue Button FHIR server prior
to running this project's integration tests, and stop it after the integration
tests. The server will serve HTTPS on port 9094 (as configured in the script),
and the FHIR server will be hosted at the root ("/") context. Alternatively,
for manual testing, manually run `mvn package dependency:copy antrun:run
org.codehaus.mojo:exec-maven-plugin:exec@server-start` to start the server. -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<id>server-start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${project.build.directory}/bluebutton-server/${artifactId}-server-start.sh</executable>
<arguments>
<argument>--javahome</argument>
<argument>${java.home}</argument>
<argument>--maxheaparg</argument>
<argument>${its.bbfhir.server.jvmargs}</argument>
<argument>--directory</argument>
<argument>${project.build.directory}/bluebutton-server</argument>
<argument>--keystore</argument>
<argument>${project.build.directory}/../../dev/ssl-stores/server.keystore</argument>
<argument>--truststore</argument>
<argument>${project.build.directory}/../../dev/ssl-stores/server.truststore</argument>
<argument>--dburl</argument>
<argument>${its.bbfhir.db.url}</argument>
<argument>--dbusername</argument>
<argument>${its.bbfhir.db.username}</argument>
<argument>--dbpassword</argument>
<argument>${its.bbfhir.db.password}</argument>
</arguments>
<!-- Don't start/stop the server if the ITs are being skipped. -->
<skip>${skipITs}</skip>
</configuration>
</execution>
<execution>
<id>server-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${project.build.directory}/bluebutton-server/${artifactId}-server-stop.sh</executable>
<arguments>
<argument>--directory</argument>
<argument>${project.build.directory}/bluebutton-server</argument>
</arguments>
<!-- Don't start/stop the server if the ITs are being skipped. -->
<skip>${skipITs}</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!-- This is to run the integration tests -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
|