
<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>
    <groupId>org.eurekaclinical</groupId>
    <artifactId>aiw-i2b2-etl</artifactId>
    <version>2.2</version>
    <packaging>jar</packaging>
    <name>AIW i2b2 ETL</name>
    <description>AIW i2b2 ETL is a Protempa query results handler for loading data and 
        abstractions into i2b2.</description>
    <inceptionYear>2012</inceptionYear>
    <parent>
        <groupId>org.eurekaclinical</groupId>
        <artifactId>eurekaclinical-parent-standard-deps</artifactId>
        <version>1</version>
    </parent>
    
    <url>https://github.com/eurekaclinical/aiw-i2b2-etl.git</url>
    
    <properties>
        <protempa.version>3.0</protempa.version>
    </properties>
    
    <scm>
        <connection>scm:git:https://github.com/eurekaclinical/aiw-i2b2-etl.git</connection>
        <developerConnection>scm:git:https://github.com/eurekaclinical/aiw-i2b2-etl.git</developerConnection>
        <url>https://github.com/eurekaclinical/aiw-i2b2-etl.git</url>
        <tag>aiw-i2b2-etl-2.2</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/eurekaclinical/aiw-i2b2-etl/issues</url>
    </issueManagement>
    
    <dependencies>
        <dependency>
            <groupId>org.eurekaclinical</groupId>
            <artifactId>protempa-framework</artifactId>
            <version>${protempa.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.dbunit</groupId>
            <artifactId>dbunit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eurekaclinical</groupId>
            <artifactId>protempa-dsb-relationaldb</artifactId>
            <version>${protempa.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.eurekaclinical</groupId>
            <artifactId>protempa-bconfigs-ini4j-ini</artifactId>
            <scope>test</scope>
            <version>${protempa.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-dbcp2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-csv</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.liquibase</groupId>
            <artifactId>liquibase-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-catalina</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eurekaclinical</groupId>
            <artifactId>eurekaclinical-ontology</artifactId>
            <version>1.0</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appassembler-maven-plugin</artifactId>
                <configuration>
                    <repositoryLayout>flat</repositoryLayout>
                    <repositoryName>lib</repositoryName>
                    <programs>
                        <program>
                            <mainClass>
                                edu.emory.cci.aiw.i2b2etl.cli.I2B2ETL
                            </mainClass>
                            <name>aiw-i2b2-etl-run</name>
                        </program>
                        <program>
                            <mainClass>
                                edu.emory.cci.aiw.i2b2etl.cli.GatherStatistics
                            </mainClass>
                            <name>aiw-i2b2-etl-stats</name>
                        </program>
                    </programs>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>assemble</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemProperties>
                        <java.awt.headless>true</java.awt.headless>
                        <argLine>-Xms512m -Xmx2g</argLine>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <configuration>
                    <delimiters>
                        <delimiter>${*}</delimiter>
                    </delimiters>
                    <useDefaultDelimiters>false</useDefaultDelimiters>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <licenseName>apache_v2</licenseName>
                    <roots>
                        <root>src/main/java</root>
                        <root>src/test/java/</root>
                    </roots>
                    <extraExtensions>
                        <!-- .xsd files are not supported by default -->
                        <!-- but should be commented in XML style -->
                        <xsd>xml</xsd>
                    </extraExtensions>
                </configuration>
                <executions>
                    <execution>
                        <id>first</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jasig.maven</groupId>
                <artifactId>maven-notice-plugin</artifactId>
                <configuration>
                    <noticeTemplate>etc/NOTICE.template</noticeTemplate>
                    <licenseMapping>
                        <param>etc/license-mappings.xml</param>
                    </licenseMapping>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-sql-from-eurekaclinical-ontology</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>eurekaclinical-ontology</includeArtifactIds>
                            <includes>
                                dbmigration/create-table-access-changelog.xml,
                                dbmigration/i2b2-meta-schema-changelog.xml
                            </includes>
                            <outputDirectory>${project.build.directory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
