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

  <parent>
    <groupId>org.camunda</groupId>
    <artifactId>camunda-release-parent</artifactId>
    <version>3.3</version>
    <!-- DO NOT REMOVE EMPTY TAG https://issues.apache.org/jira/browse/MNG-4687 -->
    <relativePath />
  </parent>

  <groupId>org.camunda.bpm.springboot.project</groupId>
  <artifactId>camunda-bpm-spring-boot-starter-root</artifactId>
  <inceptionYear>2015</inceptionYear>
  <version>3.3.1</version>

  <packaging>pom</packaging>

  <modules>
    <module>starter</module>
    <module>starter-rest</module>
    <module>starter-webapp-core</module>
    <module>starter-webapp</module>
    <module>starter-test</module>
  </modules>

  <properties>
    <spring-boot.version>2.1.5.RELEASE</spring-boot.version>
    <!-- for SNAPSHOT versions ${camunda.version} and ${camunda-webapp-ee.version} will be the same, for released versions, the latter must be with -ee suffix -->
    <camunda.version>7.11.0</camunda.version>
    <camunda-webapp-ee.version>${camunda.version}-ee</camunda-webapp-ee.version>                    <!--  for SNAPSHOT versions -->
<!--     <camunda-webapp-ee.version>${camunda.version}-ee</camunda-webapp-ee.version>          for released versions -->

    <version.java>1.8</version.java>
    <java.version>${version.java}</java.version>
    <maven.javadoc.failOnError>false</maven.javadoc.failOnError>
    <!-- disable javadoc linter for JDK8 to not fail on incomplete javadoc -->
    <additionalparam>-Xdoclint:none</additionalparam>

    <license.includeTransitiveDependencies>false</license.includeTransitiveDependencies>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <!-- Import dependency management from camunda -->
        <groupId>org.camunda.bpm</groupId>
        <artifactId>camunda-bom</artifactId>
        <version>${camunda.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>

      <dependency>
        <!-- Import dependency management from Spring Boot -->
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <scope>import</scope>
        <type>pom</type>
      </dependency>

      <dependency>
        <groupId>com.sun.xml.bind</groupId>
        <artifactId>jaxb-impl</artifactId>
        <version>2.2.4</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-lang3</artifactId>
        <version>3.8.1</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <profile>
      <id>distro-ee</id>
      <activation>
        <property>
          <name>env.RELEASE_VERSION</name>
        </property>
      </activation>
      <modules>
        <module>starter-webapp-ee</module>
      </modules>
    </profile>
    <profile>
      <id>license-header-check</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <defaultGoal>clean install</defaultGoal>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries />
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <!-- set version for spring-boot-maven-plugin because we use the
          spring-boot-parent only in dependencyManagement section, not as parent. -->
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${spring-boot.version}</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.18.1</version>
        <configuration>
          <runOrder>alphabetical</runOrder>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.0.0-M1</version>
        <configuration>
          <rules>
            <requireJavaVersion>
              <version>[1.8,)</version>
            </requireJavaVersion>
          </rules>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>1.14</version>
        <configuration>
          <acceptPomPackaging>true</acceptPomPackaging>
          <excludedScopes>test</excludedScopes>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:git@github.com:camunda/camunda-bpm-spring-boot-starter.git</connection>
    <url>scm:git:git@github.com:camunda/camunda-bpm-spring-boot-starter.git</url>
    <developerConnection>scm:git:git@github.com:camunda/camunda-bpm-spring-boot-starter.git</developerConnection>
    <tag>3.3.1</tag>
  </scm>

  <!-- repositories used for distribution of releases and snapshots, DO NOT CHANGE -->
  <distributionManagement>
    <repository>
      <id>camunda-nexus</id>
      <name>camunda bpm</name>
      <url>https://app.camunda.com/nexus/content/repositories/camunda-bpm</url>
    </repository>
    <snapshotRepository>
      <id>camunda-nexus</id>
      <name>camunda bpm snapshots</name>
      <url>https://app.camunda.com/nexus/content/repositories/camunda-bpm-snapshots</url>
      <uniqueVersion>true</uniqueVersion>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>camunda.com.public</id>
      <name>Camunda Repository</name>
      <url>https://app.camunda.com/nexus/content/groups/public</url>
    </repository>
  </repositories>

</project>
