<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.activiti.cloud</groupId>
    <artifactId>activiti-cloud-starters-root</artifactId>
    <version>7-201708-EA</version>
  </parent>

  <artifactId>activiti-cloud-starter-audit</artifactId>
  <name>Activiti Cloud Starter :: Audit</name>
  <dependencies>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-services-identity-keycloak</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-services-core-model</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-services-audit-jpa</artifactId>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-services-api</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-amqp</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-eureka</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-hateoas</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.cloud</groupId>
      <artifactId>spring-cloud-starter-sleuth</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.hateoas</groupId>
      <artifactId>spring-hateoas</artifactId>
    </dependency>
    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-core</artifactId>
    </dependency>
    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-spi</artifactId>
    </dependency>
    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-spring-web</artifactId>
    </dependency>
    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-swagger2</artifactId>
    </dependency>
    <dependency>
      <groupId>io.springfox</groupId>
      <artifactId>springfox-swagger-ui</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>

      <!--exclude tomcat and use embedded jetty, see root pom-->
      <exclusions>
        <exclusion>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
      </exclusions>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-jetty</artifactId>
    </dependency>

    <dependency>
      <groupId>org.springframework.data</groupId>
      <artifactId>spring-data-commons</artifactId>
    </dependency>

    <!-- common -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
    </dependency>

    <!-- Test deps -->
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>net.javacrumbs.json-unit</groupId>
      <artifactId>json-unit-fluent</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.activiti</groupId>
      <artifactId>activiti-services-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.activiti.cloud</groupId>
      <artifactId>activiti-cloud-starter-test</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.commonjava.maven.plugins</groupId>
        <artifactId>directory-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>io.fabric8</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <version>${maven.docker.plugin.version}</version>
        <configuration>
          <images>
            <!-- A single's image configuration -->
            <image>
              <name>activiti/activiti-cloud-sso-idm</name>
              <alias>activiti-cloud-sso-idm</alias>
              <run>
                <ports>
                  <port>8180:8180</port>
                </ports>
                <wait>
                  <log>Keycloak .* started in</log>
                  <time>40000</time>
                </wait>
              </run>
            </image>
            <image>
              <name>rabbitmq:management</name>
              <alias>activiti-rabbitmq</alias>
              <run>
                <ports>
                  <port>5672:5672</port>
                  <port>15672:15672</port>
                </ports>
                <wait>
                  <log>Server startup complete</log>
                  <time>15000</time>
                </wait>
              </run>
            </image>

          </images>
        </configuration>

        <!-- Connect start/stop to pre- and
             post-integration-test phase, respectively if you want to start
             your docker containers during integration tests -->
        <executions>
          <execution>
            <id>build</id>
            <phase>package</phase>
            <goals>
              <goal>build</goal>
            </goals>
          </execution>
          <execution>
            <id>start</id>
            <configuration>
              <skip>${skipTests}</skip>
            </configuration>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>start</goal>
            </goals>
          </execution>
          <execution>
            <id>stop</id>
            <configuration>
              <skip>${skipTests}</skip>
            </configuration>
            <phase>post-integration-test</phase>
            <goals>
              <goal>stop</goal>
              <goal>remove</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-generated-assertions-folder</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>add-test-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${generated-assertions-folder}</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-assertions-generator-maven-plugin</artifactId>

        <executions>
          <execution>
            <goals>
              <goal>generate-assertions</goal>
            </goals>
          </execution>
        </executions>

        <configuration>

          <packages>
            <package>org.activiti.services.core.model</package>
            <package>org.activiti.services.audit.events</package>
          </packages>
          <classes>
            <class>org.springframework.http.ResponseEntity</class>
          </classes>

          <!-- whether generated assertions classes can be inherited with consistent assertion chaining -->
          <hierarchical>true</hierarchical>

          <!-- where to generate assertions entry point classes -->
          <entryPointClassPackage>${generated-assertions-package}</entryPointClassPackage>

          <excludes>
            <param>org\.activiti\.services\.core\.model\.converter.*</param>
            <param>org\.activiti\.services\.core\.model\.commands.*</param>
          </excludes>

          <targetDir>${generated-assertions-folder}</targetDir>
          <generateAssertions>true</generateAssertions>
          <generateBddAssertions>false</generateBddAssertions>
          <generateSoftAssertions>false</generateSoftAssertions>
          <generateJUnitSoftAssertions>false</generateJUnitSoftAssertions>

        </configuration>
      </plugin>
    </plugins>
  </build>

</project>
