<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.community</groupId>
    <artifactId>community-hub-release-parent</artifactId>
    <version>1.0.0</version>
    <relativePath />
  </parent>

  <artifactId>bpmn-driven-testing-maven-plugin</artifactId>
  <version>0.3.0</version>
  <packaging>maven-plugin</packaging>

  <properties>
    <version.java>1.8</version.java>

    <!-- Versions -->
    <assertj.version>3.18.1</assertj.version>
    <camunda.bpm.version>7.15.0</camunda.bpm.version>
    <camunda.bpm.assert.version>10.0.0</camunda.bpm.assert.version>
    <javapoet.version>1.13.0</javapoet.version>
    <junit.version>4.13.2</junit.version>
    <maven.version>3.0</maven.version>
    <maven.plugin.version>3.5</maven.plugin.version>
    <spring.version>5.3.3</spring.version>
  </properties>

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

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

  <dependencies>
    <!-- Maven -->
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${maven.plugin.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>com.squareup</groupId>
      <artifactId>javapoet</artifactId>
      <version>${javapoet.version}</version>
    </dependency>

    <!-- Camunda -->
    <dependency>
      <groupId>org.camunda.bpm.model</groupId>
      <artifactId>camunda-bpmn-model</artifactId>
    </dependency>
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine</artifactId>
    </dependency>
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine-plugin-spin</artifactId>
    </dependency>
    <dependency>
      <groupId>org.camunda.bpm</groupId>
      <artifactId>camunda-engine-spring</artifactId>
    </dependency>

    <!-- Spring -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-beans</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-jdbc</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>${spring.version}</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
    </dependency>
    <dependency>
      <groupId>org.camunda.bpm.assert</groupId>
      <artifactId>camunda-bpm-assert</artifactId>
      <version>${camunda.bpm.assert.version}</version>
    </dependency>
    <dependency>
      <groupId>org.assertj</groupId>
      <artifactId>assertj-core</artifactId>
      <version>${assertj.version}</version>
    </dependency>

    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.11.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.12.0</version>
    </dependency>

    <!-- Test -->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      <version>1.7.25</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <version>2.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.4.197</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>3.7.7</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.robotframework</groupId>
      <artifactId>robotframework</artifactId>
      <version>3.0.4</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
	<resources>
	  <resource>
	    <directory>${project.basedir}/src/main/resources</directory>
	  </resource>

	  <!-- Since API types are needed to run generated test code -->
	  <!-- add those Java files as resources to the classpath    -->
	  <resource>
	    <directory>${project.basedir}/src/main/java/org/camunda/community/bpmndt/api</directory>
	    <targetPath>${project.build.outputDirectory}/org/camunda/community/bpmndt/api</targetPath>
	  </resource>
	</resources>

    <plugins>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.0</version>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>test</goal>
            </goals>
            <phase>integration-test</phase>
            <configuration>
              <excludes>
                <exclude>**/*Test.java</exclude>
              </excludes>
              <includes>
                <include>**/*IT.java</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Package maven plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven.plugin.version}</version>
        <configuration>
          <goalPrefix>bpmn-driven-testing</goalPrefix>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
            <phase>process-classes</phase>
          </execution>
          <execution>
            <id>help-descriptor</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
            <phase>process-classes</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <versionRange>[3.5,)</versionRange>
                    <goals>
                      <goal>descriptor</goal>
                      <goal>helpmojo</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>community-action-maven-release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <!-- Prevent gpg from using pinentry programs -->
              <gpgArguments>
                <arg>--pinentry-mode</arg>
                <arg>loopback</arg>
              </gpgArguments>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <name>BPMN Driven Testing Maven Plugin</name>
  <description>Camunda extension, which is able to generate test code based on an extended BPMN model</description>
  <url>https://github.com/camunda-community-hub/bpmn-driven-testing</url>

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

  <developers>
    <developer>
      <id>gclaussn</id>
      <name>Gabor Claußnitzer</name>
      <organization>cimt objects ag</organization>
      <organizationUrl>https://www.cimt-ag.de/</organizationUrl>
    </developer>
    <developer>
      <id>jwhoeche</id>
      <name>John-Wieland Höche</name>
      <organization>cimt objects ag</organization>
      <organizationUrl>https://www.cimt-ag.de/</organizationUrl>
    </developer>
  </developers>

  <scm>
    <url>scm:git:git@github.com:camunda-community-hub/bpmn-driven-testing.git</url>
    <connection>scm:git:git@github.com:camunda-community-hub/bpmn-driven-testing.git</connection>
    <developerConnection>scm:git:git@github.com:camunda-community-hub/bpmn-driven-testing.git</developerConnection>
    <tag>HEAD</tag>
  </scm>

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

  <issueManagement>
    <system>GitHub Issues</system>
    <url>https://github.com/camunda-community-hub/bpmn-driven-testing/issues</url>
  </issueManagement>
</project>
