<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>no.uis.fsws</groupId>
  <artifactId>fsws-proxy</artifactId>
  <version>1.0.1</version>
  <packaging>war</packaging>
  <name>Proxy for FS-WS</name>
  <description>Improved FS-WS</description>
  <url>https://github.com/uis-it/fsws-proxy</url>

  <inceptionYear>2013</inceptionYear>

  <parent>
    <groupId>no.uis</groupId>
    <artifactId>parent-pom</artifactId>
    <version>2.0.5</version>
  </parent>

  <scm>
    <url>https://github.com/uis-it/fsws-proxy</url>
    <connection>scm:git:git://github.com/uis-it/fsws-proxy.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/uis-it/fsws-proxy.git</developerConnection>
  </scm>
  <issueManagement>
    <system>Github</system>
    <url>https://github.com/uis-it/fsws-proxy/issues</url>
  </issueManagement>
  <ciManagement>
    <system>Jenkins</system>
    <url>http://build01.uis.no/jenkins/job/ws-fsws-proxy</url>
  </ciManagement>

  <properties>
    <cxf.version>2.7.5</cxf.version>
    <spring.version>3.0.7.RELEASE</spring.version>
    <junit.version>4.11</junit.version>
    <fsimport.version>3.0.0-SNAPSHOT</fsimport.version>
    <lombok.version>0.11.8</lombok.version>
    <log4j.version>1.2.17</log4j.version>
    <jaxb.version>2.2.6</jaxb.version>
    <woodstox.version>4.2.0</woodstox.version>
    <mimepull.version>1.6</mimepull.version>
    <staxex.version>1.7.1</staxex.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxws</artifactId>
        <version>${cxf.version}</version>
      </dependency>
      <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http</artifactId>
        <version>${cxf.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring.version}</version>
      </dependency>
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
      </dependency>
      <dependency>
        <groupId>no.uis.fsws</groupId>
        <artifactId>studinfo-import</artifactId>
        <version>${fsimport.version}</version>
      </dependency>
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
      </dependency>
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${lombok.version}</version>
      </dependency>
      <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>2.10.0</version>
      </dependency>
      <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>${jaxb.version}</version>
      </dependency>
      <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-xjc</artifactId>
        <version>${jaxb.version}</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.woodstox</groupId>
        <artifactId>woodstox-core-asl</artifactId>
        <version>${woodstox.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jvnet</groupId>
        <artifactId>mimepull</artifactId>
        <version>${mimepull.version}</version>
      </dependency>
      <dependency>
        <groupId>org.jvnet.staxex</groupId>
        <artifactId>stax-ex</artifactId>
        <version>${staxex.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-jaxws</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.sf.saxon</groupId>
      <artifactId>Saxon-HE</artifactId>
      <version>9.4.0.6</version>
    </dependency>
    <dependency>
      <groupId>no.uis.fsws</groupId>
      <artifactId>fsws-client</artifactId>
      <version>1.0.1</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
    </dependency>
    <dependency>
      <groupId>org.projectlombok</groupId>
      <artifactId>lombok</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
  </dependencies>

  <build>
    <finalName>ws-fsws-proxy</finalName>
    <pluginManagement>
      <plugins>
        <plugin>
          <!-- mvn clean install tomcat:run-war to deploy Look for "Running 
            war on http://xxx" and "Setting the server's publish address to be /yyy" 
            in console output; WSDL browser address will be concatenation of the two: 
            http://xxx/yyy?wsdl -->
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>2.1</version>
          <executions>
            <execution>
              <id>start-tomcat</id>
              <goals>
                <goal>run-war</goal>
              </goals>
              <phase>pre-integration-test</phase>
              <configuration>
                <port>${test.server.port}</port>
                <path>/webservice</path>
                <fork>true</fork>
                <useSeparateTomcatClassLoader>true</useSeparateTomcatClassLoader>
              </configuration>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-eclipse-plugin</artifactId>
          <configuration>
            <projectNameTemplate>ws-[artifactId]</projectNameTemplate>
            <wtpmanifest>true</wtpmanifest>
            <wtpapplicationxml>true</wtpapplicationxml>
            <wtpversion>2.0</wtpversion>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-codegen-plugin</artifactId>
        <version>${cxf.version}</version>
        <executions>
          <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>wsdl2java</goal>
            </goals>
            <configuration>
              <defaultOptions>
                <bindingFiles>
                  <bindingFile>${basedir}/src/main/jaxb/binding.xml</bindingFile>
                  <xsd>${basedir}/src/main/wsdl/studinfo.xsd</xsd>
                </bindingFiles>
              </defaultOptions>
              <wsdlOptions>
                <wsdlOption>
                  <wsdl>${basedir}/src/main/wsdl/studinfo.wsdl</wsdl>
                </wsdlOption>
                <wsdlOption>
                  <wsdl>${basedir}/src/main/wsdl/cdm.wsdl</wsdl>
                </wsdlOption>
              </wsdlOptions>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webResources>
            <resource>
              <directory>src/main/webapp</directory>
              <filtering>true</filtering>
              <includes>
                <include>version.txt</include>
                <include>WEB-INF/web.xml</include>
              </includes>
            </resource>
            <resource>
              <directory>src/main/webapp</directory>
              <filtering>false</filtering>
              <excludes>
                <exclude>version.txt</exclude>
                <exclude>WEB-INF/web.xml</exclude>
              </excludes>
            </resource>
          </webResources>
        </configuration>
      </plugin>
      <plugin>
        <groupId>pl.project13.maven</groupId>
        <artifactId>git-commit-id-plugin</artifactId>
        <version>2.1.4</version>
        <executions>
          <execution>
            <goals>
              <goal>revision</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <dotGitDirectory>${project.basedir}/.git</dotGitDirectory>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>2.10</version>
        <configuration>
          <configLocation>checkstyle/checkstyle.xml</configLocation>
          <propertyExpansion>basedir=${basedir}</propertyExpansion>
          <suppressionsLocation>checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
          <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>${basedir}/src/main/wsdl/studinfo.wsdl</file>
                  <type>wsdl</type>
                  <classifier>studinfo</classifier>
                </artifact>
                <artifact>
                  <file>${basedir}/src/main/wsdl/cdm.wsdl</file>
                  <type>wsdl</type>
                  <classifier>cdm</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.4</version>
        <configuration>
          <descriptors>
            <descriptor>src/main/assembly/api.xml</descriptor>
            <descriptor>src/main/assembly/api-sources.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>make-api-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <skip>true</skip>
          <skipDeploy>true</skipDeploy>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
