<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>
  {{#appDescription}}
  <description>{{.}}</description>
  {{/appDescription}}
  <version>{{artifactVersion}}</version>
{{#generateSpringBootApplication}}
  <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.7.15</version>
  </parent>
{{/generateSpringBootApplication}}
{{^generateSpringBootApplication}}
{{#parentOverridden}}
  <parent>
    <groupId>{{parentGroupId}}</groupId>
    <artifactId>{{parentArtifactId}}</artifactId>
    <version>{{parentVersion}}</version>
  </parent>
{{/parentOverridden}}
{{/generateSpringBootApplication}}
  <build>
    <sourceDirectory>src/main/java</sourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <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>
{{#useBeanValidation}}
        <dependencies>
          <dependency>
              <groupId>jakarta.validation</groupId>
              <artifactId>jakarta.validation-api</artifactId>
              <version>${beanvalidation-version}</version>
          </dependency>
        </dependencies>
{{/useBeanValidation}}
        <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>
{{^generateSpringBootApplication}}
        <version>1.9.1</version>
{{/generateSpringBootApplication}}
        <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>
        <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>
      <exclusions>
        <exclusion>
          <groupId>javax.ws.rs</groupId>
          <artifactId>jsr311-api</artifactId>
        </exclusion>
          <!-- excluded validation-api:1.1.0.Final due to fact that it doesn't support TYPE_USE,
for this project used jakarta.validation-api -->
          <exclusion>
              <groupId>javax.validation</groupId>
              <artifactId>validation-api</artifactId>
          </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
{{^generateSpringBootApplication}}
      <version>${logback-version}</version>
{{/generateSpringBootApplication}}
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-core</artifactId>
{{^generateSpringBootApplication}}
      <version>${logback-version}</version>
{{/generateSpringBootApplication}}
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
{{^generateSpringBootApplication}}
      <version>${junit-version}</version>
{{/generateSpringBootApplication}}
      <scope>test</scope>
    </dependency>
{{#useBeanValidation}}
    <!-- Bean Validation API support -->
    <dependency>
      <groupId>jakarta.validation</groupId>
      <artifactId>jakarta.validation-api</artifactId>
{{^generateSpringBootApplication}}
      <version>${beanvalidation-version}</version>
{{/generateSpringBootApplication}}
      <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>
    <!-- Jackson -->
    <dependency>
      <groupId>com.fasterxml.jackson.jaxrs</groupId>
      <artifactId>jackson-jaxrs-json-provider</artifactId>
{{^generateSpringBootApplication}}
      <version>${jackson-jaxrs-version}</version>
{{/generateSpringBootApplication}}
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.jaxrs</groupId>
      <artifactId>jackson-jaxrs-xml-provider</artifactId>
{{^generateSpringBootApplication}}
      <version>${jackson-jaxrs-version}</version>
{{/generateSpringBootApplication}}
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jsr310</artifactId>
{{^generateSpringBootApplication}}
      <version>${jackson-jaxrs-version}</version>
{{/generateSpringBootApplication}}
    </dependency>
{{#generateSpringApplication}}
    <!-- Spring Framework -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
{{^generateSpringBootApplication}}
      <version>${spring-version}</version>
{{/generateSpringBootApplication}}
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-aop</artifactId>
{{^generateSpringBootApplication}}
      <version>${spring-version}</version>
{{/generateSpringBootApplication}}
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
{{^generateSpringBootApplication}}
      <version>${spring-version}</version>
{{/generateSpringBootApplication}}
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
{{^generateSpringBootApplication}}
      <version>${spring-version}</version>
{{/generateSpringBootApplication}}
    </dependency>
{{/generateSpringApplication}}
{{#generateSpringBootApplication}}
    <!-- Spring Boot dependencies for integration tests -->
    <!--dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
      <scope>provided</scope>
    </dependency-->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-autoconfigure</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <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>3.6.1</version>
    </dependency>
{{/useSwaggerUI}}
{{#generateOperationBody}}
{{#loadTestDataFromFile}}
    <dependency>
      <groupId>org.openapitools</groupId>
      <artifactId>openapi-generator</artifactId>
      <version>{{{generatorVersion}}}</version>
    </dependency>
{{/loadTestDataFromFile}}
{{/generateOperationBody}}
  </dependencies>
  <repositories>
    <repository>
      <id>sonatype-snapshots</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>sonatype-releases</id>
      <url>https://oss.sonatype.org/content/repositories/releases</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
  <properties>
    <java.version>1.8</java.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <swagger-core-version>1.5.18</swagger-core-version>
    <jetty-version>9.2.9.v20150224</jetty-version>
{{#useBeanValidation}}
    <beanvalidation-version>2.0.2</beanvalidation-version>
{{/useBeanValidation}}
{{#generateSpringApplication}}
  {{^generateSpringBootApplication}}
    <spring-version>5.0.8.RELEASE</spring-version>
  {{/generateSpringBootApplication}}
{{/generateSpringApplication}}
{{^generateSpringBootApplication}}
    <junit-version>4.13.2</junit-version>
    <logback-version>1.2.12</logback-version>
{{/generateSpringBootApplication}}
    <cxf-version>3.3.0</cxf-version>
    <jackson-jaxrs-version>2.15.2</jackson-jaxrs-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
</project>
