<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>2.5</version>
    <!-- DO NOT REMOVE EMPTY TAG https://issues.apache.org/jira/browse/MNG-4687 -->
    <relativePath />
  </parent>

  <groupId>org.camunda.bpm.extension</groupId>
  <artifactId>camunda-bpm-spring-boot-starter-root</artifactId>
  <version>1.0.0</version>

  <packaging>pom</packaging>

  <modules>
    <module>camunda-spring-boot-starter</module>
    <module>examples</module>
    <module>camunda-spring-boot-starter-docs</module>
  </modules>

  <properties>
    <spring-boot.version>1.2.5.RELEASE</spring-boot.version>
    <camunda.version>7.3.0</camunda.version>
    <resteasy.version>3.0.8.Final</resteasy.version>

    <!-- camunda and spring use different properties ... -->
    <java.version>${version.java}</java.version>
  </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.18.1</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <version>${spring-boot.version}</version>
      </plugin>
    </plugins>
  </build>

  <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>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jaxrs</artifactId>
        <version>${resteasy.version}</version>
      </dependency>

      <dependency>
        <groupId>org.camunda.bpm.extension</groupId>
        <artifactId>camunda-bpm-spring-boot-starter</artifactId>
        <version>${project.version}</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <profiles>
    <!-- this is only for jdk 1.6. you can remove this when using java version
      later than 1.6 -->
    <profile>
      <id>java6</id>
      <activation>
        <jdk>1.6</jdk>
      </activation>
      <properties>
        <!-- camunda and spring use different properties ... -->
        <java.version>${version.java}</java.version>
        <!-- because of java 1.6 compatibility -->
        <tomcat.version>7.0.59</tomcat.version>
        <jersey.version>2.6</jersey.version>
      </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>
            <type>pom</type>
            <scope>import</scope>
          </dependency>

          <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-core</artifactId>
            <version>${tomcat.version}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-el</artifactId>
            <version>${tomcat.version}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-logging-juli</artifactId>
            <version>${tomcat.version}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-websocket</artifactId>
            <version>${tomcat.version}</version>
          </dependency>
          <dependency>
            <groupId>org.apache.tomcat</groupId>
            <artifactId>tomcat-jdbc</artifactId>
            <version>${tomcat.version}</version>
          </dependency>
          <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-server</artifactId>
            <version>${jersey.version}</version>
          </dependency>
          <dependency>
            <groupId>org.glassfish.jersey.containers</groupId>
            <artifactId>jersey-container-servlet-core</artifactId>
            <version>${jersey.version}</version>
          </dependency>
          <dependency>
            <groupId>org.glassfish.jersey.containers</groupId>
            <artifactId>jersey-container-servlet</artifactId>
            <version>${jersey.version}</version>
          </dependency>
          <dependency>
            <groupId>org.glassfish.jersey.ext</groupId>
            <artifactId>jersey-bean-validation</artifactId>
            <version>${jersey.version}</version>
            <exclusions>
              <exclusion>
                <groupId>javax.el</groupId>
                <artifactId>javax.el-api</artifactId>
              </exclusion>
              <exclusion>
                <groupId>org.glassfish.web</groupId>
                <artifactId>javax.el</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
          <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-jaxrs</artifactId>
            <version>${resteasy.version}</version>
          </dependency>
          <dependency>
            <groupId>org.glassfish.jersey.ext</groupId>
            <artifactId>jersey-spring3</artifactId>
            <version>${jersey.version}</version>
          </dependency>
          <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-jackson</artifactId>
            <version>${jersey.version}</version>
          </dependency>
          <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
            <version>2.1.0</version>
          </dependency>
          <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <version>${spring-boot.version}</version>
            <exclusions>
              <exclusion>
                <groupId>javax.transaction</groupId>
                <artifactId>javax.transaction-api</artifactId>
              </exclusion>
            </exclusions>
          </dependency>

        </dependencies>
      </dependencyManagement>
    </profile>

    <!-- use this profile if you want to specify a specific jdk for compilation
      and tests -->
    <profile>
      <id>specific jdk location</id>
      <activation>
        <property>
          <name>jdk_home</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <fork>true</fork>
              <executable>${jdk_home}/bin/javac</executable>
              <compilerVersion>${version.java}</compilerVersion>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>2.18.1</version>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <jvm>${jdk_home}/bin/java</jvm>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>


  <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>1.0.0</tag>
  </scm>

  <!-- repositories used for distribution of releases and snapshots, DO NOT
    CHANGE -->
  <distributionManagement>
    <repository>
      <id>camunda-nexus</id>
      <name>camunda bpm community extensions</name>
      <url>https://app.camunda.com/nexus/content/repositories/camunda-bpm-community-extensions</url>
    </repository>
    <snapshotRepository>
      <id>camunda-nexus</id>
      <name>camunda bpm community extensions snapshots</name>
      <url>https://app.camunda.com/nexus/content/repositories/camunda-bpm-community-extensions-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>
