<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>{{groupId}}</groupId>
  <artifactId>{{artifactId}}</artifactId>
  <packaging>war</packaging>
  <name>{{artifactId}}</name>
  <version>{{artifactVersion}}</version>
  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <!--plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>${jetty-version}</version>
        <configuration>
          <webApp>
            <contextPath>/</contextPath>
          </webApp>
          <webAppSourceDirectory>target/${project.artifactId}-${project.version}</webAppSourceDirectory>
          <stopPort>8079</stopPort>
          <stopKey>stopit</stopKey>
          <httpConnector>
            <port>{{serverPort}}</port>
            <idleTimeout>60000</idleTimeout>
          </httpConnector>
        </configuration>
        <executions>
          <execution>
            <id>start-jetty</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>start</goal>
            </goals>
            <configuration>
              <scanIntervalSeconds>0</scanIntervalSeconds>
              <daemon>true</daemon>
            </configuration>
          </execution>
          <execution>
            <id>stop-jetty</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>stop</goal>
            </goals>
          </execution>
        </executions>
      </plugin-->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.9.1</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src/gen/java</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      
      <!-- build WAR file -->
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <version>2.1.1</version>
        <configuration>
           <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
    </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
      <groupId>io.swagger</groupId>
      <artifactId>swagger-jaxrs</artifactId>
      <scope>compile</scope>
      <version>${swagger-core-version}</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>${logback-version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
      <version>${logback-version}</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit-version}</version>
      <scope>test</scope>
    </dependency>
{{#useBeanValidation}}
    <!-- Bean Validation API support -->
    <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>${beanvalidation-version}</version>
        <scope>provided</scope>
    </dependency>
{{/useBeanValidation}}
    <!-- CXF Client -->
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-rs-client</artifactId>
        <version>${cxf-version}</version>
        <scope>test</scope>
    </dependency>
    
     <!-- CXF server -->
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxrs</artifactId>
        <version>${cxf-version}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-rs-service-description</artifactId>
        <version>${cxf-version}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-rs-service-description-swagger</artifactId>
        <version>${cxf-version}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-ws-policy</artifactId>
        <version>${cxf-version}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-wsdl</artifactId>
        <version>${cxf-version}</version>
        <scope>compile</scope>
    </dependency>
{{#generateSpringApplication}}    
    <!-- Spring -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${spring-version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-web</artifactId>
        <version>${spring-version}</version>
    </dependency>    
{{/generateSpringApplication}}
{{#generateSpringBootApplication}}
<!-- Spring Boot dependencies für Integrationstests -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <version>${spring.boot-version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <version>${spring.boot-version}</version>
            <scope>test</scope>
        </dependency>
        
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
            <version>${cxf-version}</version>
            <scope>provided</scope>
        </dependency>
{{/generateSpringBootApplication}}
{{#useSwaggerUI}}
        <dependency>
            <groupId>org.webjars</groupId>
            <artifactId>swagger-ui</artifactId>
            <version>2.1.8-M1</version>
        </dependency>
{{/useSwaggerUI}}
  </dependencies>
  <repositories>
    <repository>
      <id>sonatype-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  <properties>
    <java.version>{{#java8}}1.8{{/java8}}{{^java8}}1.7{{/java8}}</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <swagger-core-version>1.5.12</swagger-core-version>
    <jetty-version>9.2.9.v20150224</jetty-version>
    <jersey2-version>2.22.2</jersey2-version>
    <junit-version>4.12</junit-version>
    <logback-version>1.1.7</logback-version>
    <servlet-api-version>2.5</servlet-api-version>
{{#useBeanValidation}}    
    <beanvalidation-version>1.1.0.Final</beanvalidation-version>
{{/useBeanValidation}}    
{{#generateSpringApplication}}    
    <spring-version>4.2.5.RELEASE</spring-version>
{{/generateSpringApplication}}    
{{#generateSpringBootApplication}}
    <spring.boot-version>1.3.3.RELEASE</spring.boot-version>
{{/generateSpringBootApplication}}    
    <cxf-version>3.1.8</cxf-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>
