<?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">
  <modelVersion>4.0.0</modelVersion>

  <groupId>com.github.rahulsom</groupId>
  <artifactId>ihe-iti</artifactId>
  <version>0.7</version>

  <name>IHE ITI</name>
  <description>Codegen for IHE ITI Profiles.</description>
  <url>https://rahulsom.github.com/ihe-iti</url>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/rahulsom/ihe-iti.git</url>
    <connection>scm:git:git@github.com:rahulsom/ihe-iti.git</connection>
    <developerConnection>scm:git:git@github.com:rahulsom/ihe-iti.git</developerConnection>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/rahulsom/ihe-iti/issues</url>
  </issueManagement>

  <ciManagement>
    <system>travis</system>
    <url>https://travis-ci.org/rahulsom/ihe-iti</url>
  </ciManagement>

  <mailingLists>
    <mailingList>
      <name>Main List</name>
      <subscribe>ihe-iti-subscribe@googlegroups.com</subscribe>
      <unsubscribe>ihe-iti-unsubscribe@googlegroups.com</unsubscribe>
      <post>ihe-iti@googlegroups.com</post>
      <archive>https://groups.google.com/d/forum/ihe-iti</archive>
    </mailingList>
  </mailingLists>

  <developers>
    <developer>
      <id>rahulsom</id>
      <name>Rahul Somasunderam</name>
      <email>rahul.som@gmail.com</email>
    </developer>
  </developers>

  <build>
    <plugins>
      <plugin>
        <groupId>org.jvnet.jax-ws-commons</groupId>
        <artifactId>jaxws-maven-plugin</artifactId>
        <version>${jaxws.plugin.version}</version>
        <dependencies>
          <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-fluent-api</artifactId>
            <version>3.0</version>
          </dependency>
          <dependency>
            <groupId>org.jvnet.jaxb2_commons</groupId>
            <artifactId>jaxb2-commons-lang</artifactId>
            <version>2.3</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>wsimport</goal>
            </goals>
            <configuration>
			        <!--
              <catalog>${basedir}/src/main/resources/ihe-iti.cat</catalog>
              <bindingFiles>
                <bindingFile>${basedir}/src/main/resources/iti/wsdlbind/jaxws.xjb</bindingFile>
              </bindingFiles>
              -->
              <wsdlDirectory>${basedir}/src/main/resources/iti/wsdl</wsdlDirectory>
              <wsdlFiles>
                <!--
                This needs DSMLv2 which is missing
                <wsdlFile>HPD_ProviderInformationDirectory.wsdl</wsdlFile>
                -->
                <wsdlFile>PDQSupplier.wsdl</wsdlFile>
                <wsdlFile>PIXConsumer.wsdl</wsdlFile>
                <wsdlFile>PIXManager.wsdl</wsdlFile>
                <wsdlFile>RFDFormManager.wsdl</wsdlFile>
                <wsdlFile>SVS_ValueSetRepository.wsdl</wsdlFile>
                <wsdlFile>XCAInitiatingGatewayQuery.wsdl</wsdlFile>
                <wsdlFile>XCAInitiatingGatewayRetrieve.wsdl</wsdlFile>
                <wsdlFile>XCARespondingGatewayQuery.wsdl</wsdlFile>
                <wsdlFile>XCARespondingGatewayRetrieve.wsdl</wsdlFile>
                <wsdlFile>XCPDInitiatingGateway.wsdl</wsdlFile>
                <wsdlFile>XCPDRespondingGateway.wsdl</wsdlFile>
                <wsdlFile>XDS.b_DocumentRegistry.wsdl</wsdlFile>
                <wsdlFile>XDS.b_DocumentRepository.wsdl</wsdlFile>
                <wsdlFile>XDS-I.b_ImagingDocumentSource.wsdl</wsdlFile>
              </wsdlFiles>
              <extension>true</extension>
              <xadditionalHeaders>true</xadditionalHeaders>
              <sourceDestDir>${project.build.directory}/generated-sources/ihe</sourceDestDir>
              <xjcArgs>
                <xjcArg>-Xfluent-api</xjcArg>
                <xjcArg>-Xcommons-lang</xjcArg>
              </xjcArgs>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.jvnet.jaxb2.maven2</groupId>
        <artifactId>maven-jaxb22-plugin</artifactId>
        <version>${jaxb.plugin.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>generate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <catalog>${basedir}/src/main/resources/ihe-iti.cat</catalog>
          <forceRegenerate>true</forceRegenerate>
          <schemaDirectory>src/main/resources/iti/schema</schemaDirectory>
          <schemaIncludes>
            <include>**/*.xsd</include>
          </schemaIncludes>
          <schemaExcludes>
            <exclude>**/XDW-2012-04-02.xsd</exclude>
            <exclude>**/XDW/POCD_MT000040.xsd</exclude>
            <exclude>**/PRPA_IN201303UV02.xsd</exclude>
            <exclude>**/SVS.xsd</exclude>
            <exclude>**/ESVS-20100726.xsd</exclude>
            <exclude>**/XCPD_PLQ.xsd</exclude>
            <exclude>**/XDS.b_DocumentRepository.xsd</exclude>
            <exclude>**/XDSI.b_ImagingDocumentSource.xsd</exclude>
          </schemaExcludes>
          <bindingDirectory>${basedir}/src/main/resources/iti/bindings</bindingDirectory>
          <generateDirectory>${project.build.directory}/generated-sources/ihe</generateDirectory>
          <plugins>
            <plugin>
              <groupId>org.jvnet.jaxb2_commons</groupId>
              <artifactId>jaxb2-fluent-api</artifactId>
              <version>3.0</version>
            </plugin>
            <plugin>
              <groupId>org.jvnet.jaxb2_commons</groupId>
              <artifactId>jaxb2-commons-lang</artifactId>
              <version>2.3</version>
            </plugin>
          </plugins>
          <args>
            <arg>-Xfluent-api</arg>
            <arg>-Xcommons-lang</arg>
            <arg>-npa</arg>
          </args>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <compilerId>groovy-eclipse-compiler</compilerId>
          <!-- set verbose to be true if you want lots of uninteresting messages -->
          <!-- <verbose>true</verbose> -->
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-eclipse-compiler</artifactId>
            <version>${gec.version}</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-eclipse-compiler</artifactId>
        <version>${gec.version}</version>
        <extensions>true</extensions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <quiet>true</quiet>
          <maxmemory>800m</maxmemory>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>com.github.damage-control.report</groupId>
        <artifactId>damage-control-maven-plugin</artifactId>
        <version>1.1.0</version>
        <configuration>
          <skip>false</skip>
          <testResultsFolders>
            <testResultsFolder>target/surefire-reports</testResultsFolder>
            <testResultsFolder>target/failsafe-reports</testResultsFolder>
          </testResultsFolders>
        </configuration>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.11</version>
        <configuration>
          <testFailureIgnore>true</testFailureIgnore>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.16</version>
        <executions>
          <execution>
            <phase>test</phase>
            <goals>
              <goal>integration-test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>

  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <maxmemory>512m</maxmemory>
          <quiet>true</quiet>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.codehaus.groovy</groupId>
      <artifactId>groovy-all</artifactId>
      <version>${groovy.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>com.sun.xml.bind</groupId>
      <artifactId>jaxb-impl</artifactId>
      <version>${jaxb.impl.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jvnet.jaxb2_commons</groupId>
      <artifactId>jaxb2-basics-runtime</artifactId>
      <version>${jaxb.basics.version}</version>
    </dependency>

    <dependency>
      <groupId>xmlunit</groupId>
      <artifactId>xmlunit</artifactId>
      <version>1.4</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.6</version>
    </dependency>

    <dependency>
      <groupId>org.spockframework</groupId>
      <artifactId>spock-core</artifactId>
      <version>0.7-groovy-2.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <scope>test</scope>
      <groupId>co.freeside</groupId>
      <artifactId>betamax</artifactId>
      <version>1.1.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-jaxws</artifactId>
      <version>${cxf.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http</artifactId>
      <version>${cxf.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <distributionManagement>
    <snapshotRepository>
      <id>nexus-oss-snapshot</id>
      <name>Nexus OSS Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus OSS Staging</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
  </distributionManagement>

  <properties>
    <jaxb.basics.version>0.6.4</jaxb.basics.version>
    <junit.version>4.11</junit.version>
    <groovy.version>2.0.6</groovy.version>
    <jaxb.impl.version>2.2.6</jaxb.impl.version>
    <gec.version>2.7.0-01</gec.version>
    <jaxws.plugin.version>2.2</jaxws.plugin.version>
    <jaxb.plugin.version>0.8.3</jaxb.plugin.version>
    <cxf.version>2.2.3</cxf.version>

    <!-- set the character encoding for the build, so it is not platform-dependent -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

</project>

