<?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.1</version>

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

  <licenses>
    <license>
      <name>Need to fix licensing</name>
      <url>http://foo/</url>
      <distribution>No details yet</distribution>
    </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>

  <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>
        <executions>
          <execution>
            <goals>
              <goal>wsimport</goal>
            </goals>
            <!-- Following configuration will pass ${basedir}/src/remote-xjc/bindings.xjc and ${basedir}/src/jaxws/bindings-default.xjc to wsimport. -->
            <configuration>
              <bindingFiles>
                <bindingFile>${basedir}/src/main/resources/iti/bindings/bind.xjb</bindingFile>
              </bindingFiles>
              <wsdlDirectory>${basedir}/src/main/resources/iti/wsdl</wsdlDirectory>
              <wsdlFiles>
                <wsdlFile>PDQSupplier.wsdl</wsdlFile>
                <wsdlFile>PIXConsumer.wsdl</wsdlFile>
                <wsdlFile>PIXManager.wsdl</wsdlFile>
                <wsdlFile>XCAInitiatingGatewayQuery.wsdl</wsdlFile>
                <wsdlFile>XCAInitiatingGatewayRetrieve.wsdl</wsdlFile>
                <wsdlFile>XCARespondingGatewayQuery.wsdl</wsdlFile>
                <wsdlFile>XCARespondingGatewayRetrieve.wsdl</wsdlFile>
                <wsdlFile>XDS.b_DocumentRegistry.wsdl</wsdlFile>
                <wsdlFile>XDS.b_DocumentRepository.wsdl</wsdlFile>
                <wsdlFile>XCPDInitiatingGateway.wsdl</wsdlFile>
                <wsdlFile>XCPDRespondingGateway.wsdl</wsdlFile>
              </wsdlFiles>
              <extension>true</extension>
              <xadditionalHeaders>true</xadditionalHeaders>
              <sourceDestDir>${project.build.directory}/generated-sources/ihe</sourceDestDir>
            </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>
          <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>
          </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>
          </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>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</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>
      </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>
    </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>

  </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>

    <!-- 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>
