CMSgov/dpc-app

View on GitHub
dpc-attribution/pom.xml

Summary

Maintainability
Test Coverage
<?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"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>dpc-app</artifactId>
        <groupId>gov.cms.dpc</groupId>
        <version>0.4.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>dpc-attribution</artifactId>
    <name>DPC Provider Attribution Service</name>

    <properties>
        <mainClass>gov.cms.dpc.attribution.DPCAttributionService</mainClass>
    </properties>

    <dependencies>
        <dependency>
            <groupId>gov.cms.dpc</groupId>
            <artifactId>dpc-common</artifactId>
            <version>0.4.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>gov.cms.dpc</groupId>
            <artifactId>dpc-testing</artifactId>
            <version>0.4.0-SNAPSHOT</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-migrations</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-hibernate</artifactId>
        </dependency>
        <dependency>
            <groupId>io.github.dropwizard-jobs</groupId>
            <artifactId>dropwizard-jobs-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.github.dropwizard-jobs</groupId>
            <artifactId>dropwizard-jobs-guice</artifactId>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
        </dependency>
        <!--No longer shipped with Java 11, so we need to include it manually-->
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>ru.vyarus</groupId>
            <artifactId>dropwizard-guicey</artifactId>
        </dependency>
        <dependency>
            <groupId>com.google.inject</groupId>
            <artifactId>guice</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jooq</groupId>
            <artifactId>jooq</artifactId>
            <version>${jooq.version}</version>
        </dependency>
        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
        </dependency>
        <dependency>
            <groupId>com.smoketurner</groupId>
            <artifactId>dropwizard-swagger</artifactId>
        </dependency>
        <dependency>
            <groupId>com.newrelic.agent.java</groupId>
            <artifactId>newrelic-java</artifactId>
            <version>${newrelic.agent.version}</version>
            <type>${newrelic.agent.type}</type>
        </dependency>
        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-json-logging</artifactId>
        </dependency>
        <!--Testing dependencies-->
        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-testing</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>io.dropwizard</groupId>
            <artifactId>dropwizard-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${hapi.fhir.groupID}</groupId>
            <artifactId>hapi-fhir-client</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- required by HAPI FHIR; specifying non-vulnerable version -->
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.8.9</version>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${project.basedir}/../src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>${project.basedir}/../src/main/resources</directory>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
            <testResource>
                <directory>${project.basedir}/../src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <artifactId>maven-shade-plugin</artifactId>
                <configuration>
                    <createDependencyReducedPom>true</createDependencyReducedPom>
                    <transformers>
                        <transformer
                                implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                        <transformer
                                implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                            <mainClass>${mainClass}</mainClass>
                        </transformer>
                    </transformers>
                    <!-- exclude signed Manifests -->
                    <filters>
                        <filter>
                            <artifact>*:*</artifact>
                            <excludes>
                                <exclude>META-INF/*.SF</exclude>
                                <exclude>META-INF/*.DSA</exclude>
                                <exclude>META-INF/*.RSA</exclude>
                            </excludes>
                        </filter>
                    </filters>
                    <shadedArtifactAttached>true</shadedArtifactAttached>
                    <finalName>${project.artifactId}</finalName>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <mainClass>${mainClass}</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.google.cloud.tools</groupId>
                <artifactId>jib-maven-plugin</artifactId>
                <configuration>
                    <container>
                        <args>
                            <arg>server</arg>
                            <!--<arg>${jib.container.appRoot}/resources/application.yml</arg>-->
                        </args>
                        <ports>
                            <port>8080</port>
                        </ports>
                        <environment>
                            <DB_MIGRATION>1</DB_MIGRATION>
                        </environment>
                        <entrypoint>/entrypoint.sh</entrypoint>
                    </container>
                    <extraDirectories>
                        <paths>
                            <path>${project.basedir}/docker</path>
                            <path>${project.basedir}/target/jacoco-agent</path>
                            <path>${project.basedir}/target/newrelic-agent</path>
                        </paths>
                        <permissions>
                            <permission>
                                <file>/entrypoint.sh</file>
                                <mode>755</mode>
                            </permission>
                        </permissions>
                    </extraDirectories>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.jooq</groupId>
                <artifactId>jooq-codegen-maven</artifactId>
                <version>${jooq.version}</version>
                <executions>
                    <execution>
                        <id>generate-postgres-jpa</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <generator>
                                <database>
                                    <name>org.jooq.meta.extensions.jpa.JPADatabase</name>
                                    <properties>
                                        <property>
                                            <key>packages</key>
                                            <value>gov.cms.dpc.common.entities</value>
                                        </property>
                                        <property>
                                            <key>dialect</key>
                                            <value>org.hibernate.dialect.PostgreSQL10Dialect</value>
                                        </property>
                                    </properties>
                                    <includes>.*</includes>
                                </database>
                                <generate>
                                    <javaTimeTypes>true</javaTimeTypes>
                                </generate>
                                <target>
                                    <packageName>gov.cms.dpc.attribution.dao</packageName>
                                    <directory>target/generated-sources/jooq</directory>
                                </target>
                            </generator>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.jooq</groupId>
                        <artifactId>jooq-meta-extensions</artifactId>
                        <version>${jooq.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>javax.persistence</groupId>
                        <artifactId>javax.persistence-api</artifactId>
                        <version>2.2</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
</project>