<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         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>org.operaton</groupId>
    <artifactId>migrate-camunda-recipe</artifactId>
    <version>1.0.1</version>

    <name>Operaton - Migrate Camunda Recipe</name>
    <description>Open Rewrite recipes for the migration from Camunda 7 to Operaton</description>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <version.camunda>7.24.0</version.camunda>
        <version.operaton>1.0.0</version.operaton>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.42</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <!-- Refaster style recipes need the rewrite-templating annotation processor and dependency for generated recipes -->
        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-templating</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>1.3.2</version>
        </dependency>

        <!-- Makes Data flow analysis capabilities available to recipes -->
        <dependency>
            <groupId>org.openrewrite.meta</groupId>
            <artifactId>rewrite-analysis</artifactId>
        </dependency>

        <dependency>
            <groupId>com.google.errorprone</groupId>
            <artifactId>error_prone_core</artifactId>
            <version>2.44.0</version>
            <scope>provided</scope>
            <optional>true</optional>
            <exclusions>
                <exclusion>
                    <groupId>com.google.auto.service</groupId>
                    <artifactId>auto-service-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-java</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-yaml</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openrewrite.recipe</groupId>
            <artifactId>rewrite-java-dependencies</artifactId>
        </dependency>

        <dependency>
            <groupId>org.openrewrite.recipe</groupId>
            <artifactId>rewrite-spring</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openrewrite.recipe</groupId>
            <artifactId>rewrite-quarkus</artifactId>
        </dependency>
        <!-- Camunda dependencies -->
        <dependency>
            <groupId>org.camunda.bpm</groupId>
            <artifactId>camunda-engine</artifactId>
            <version>${version.camunda}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.camunda.bpm.springboot</groupId>
            <artifactId>camunda-bpm-spring-boot-starter</artifactId>
            <version>${version.camunda}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
          <groupId>org.camunda.bpm.springboot</groupId>
          <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
          <version>${version.camunda}</version>
          <scope>test</scope>
        </dependency>

        <!-- Operaton dependencies -->
        <dependency>
            <groupId>org.operaton.bpm</groupId>
            <artifactId>operaton-engine</artifactId>
            <version>${version.operaton}</version>
            <scope>test</scope>
        </dependency>

        <!-- test dependencies -->

        <dependency>
            <groupId>org.openrewrite</groupId>
            <artifactId>rewrite-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.27.7</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.openrewrite.recipe</groupId>
                <artifactId>rewrite-recipe-bom</artifactId>
                <version>3.18.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.junit</groupId>
                <artifactId>junit-bom</artifactId>
                <version>5.14.1</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.14.1</version>
                <configuration>
                    <source>8</source>
                    <target>8</target>
                    <testSource>17</testSource>
                    <testTarget>17</testTarget>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <annotationProcessorPaths>
                        <path>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                            <version>1.18.42</version>
                        </path>
                        <path>
                            <groupId>org.openrewrite</groupId>
                            <artifactId>rewrite-templating</artifactId>
                            <version>1.37.0</version>
                        </path>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.5.4</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.5.4</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.3.1</version>
                <configuration>
                    <nonFilteredFileExtensions>
                        <nonFilteredFileExtension>jar</nonFilteredFileExtension>
                    </nonFilteredFileExtensions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.9.0</version>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.basedir}/src/main/resources/META-INF/rewrite/classpath</outputDirectory>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <!-- Configure and enable plugin when you use `classpathFromResources` in `JavaTemplate` -->
                            <skip>true</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!--
                Only needed when you want to apply the OpenRewriteBestPractices recipe to your recipes through
                ./mvnw rewrite:run
            -->
            <plugin>
                <groupId>org.openrewrite.maven</groupId>
                <artifactId>rewrite-maven-plugin</artifactId>
                <version>6.28.1</version>
                <configuration>
                    <activeRecipes>
                        <activeRecipe>org.openrewrite.recipes.rewrite.OpenRewriteRecipeBestPractices</activeRecipe>
                    </activeRecipes>
                    <failOnDryRunResults>true</failOnDryRunResults>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.openrewrite.recipe</groupId>
                        <artifactId>rewrite-rewrite</artifactId>
                        <version>0.19.0</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.3.1</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.12.0</version>
                        <configuration>
                            <failOnError>false</failOnError>
                            <additionalJOptions>
                                <additionalJOption>-Xdoclint:none</additionalJOption>
                                <additionalJOption>--ignore-source-errors</additionalJOption>
                            </additionalJOptions>
                            <doctitle>Operaton Javadocs ${project.version}</doctitle>
                            <windowtitle>Operaton Javadocs ${project.version}</windowtitle>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.jreleaser</groupId>
                        <artifactId>jreleaser-maven-plugin</artifactId>
                        <version>1.20.0</version>
                        <inherited>false</inherited>
                    </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>

    <url>http://www.operaton.org</url>

    <developers>
        <developer>
            <id>operaton.org</id>
            <name>OPERATON Community</name>
            <organization>operaton.org</organization>
            <organizationUrl>http://operaton.org</organizationUrl>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/operaton/migrate-from-camunda-recipe</url>
        <connection>scm:git:git://github.com/operaton/migrate-from-camunda-recipe.git</connection>
        <developerConnection>${project.scm.connection}</developerConnection>
    </scm>

</project>
