<?xml version="1.0" encoding="UTF-8"?>

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.bitbucket.plugin.bcma</groupId>
        <artifactId>bitbucket-migration-plugin-parent</artifactId>
        <version>1.3.19</version>
    </parent>

    <name>Bitbucket Cloud Migration Assistant</name>
    <description>Bitbucket Cloud Migration Assistant</description>

    <artifactId>bitbucket-migration-plugin</artifactId>
    <version>1.3.19</version>
    <packaging>atlassian-plugin</packaging>

    <properties>
        <!-- The package was renamed from com.atlassian.bitbucket.migration to com.atlassian.bitbucket.plugin.bcma
        The plugin key was previously dynamically defined based on the package name. We're hard coding it to the old
        value to ensure that plugin operations (e.g. upgrades) continue to work. -->
        <atlassian.plugin.key>com.atlassian.bitbucket.migration.bitbucket-migration-plugin</atlassian.plugin.key>
    </properties>

    <dependencies>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.annotations</groupId>
            <artifactId>atlassian-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-util</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-git-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-rest-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-rest-model</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-spi</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>${javax.inject.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
            <version>${atlassian.osgi.javaconfig.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cache</groupId>
            <artifactId>atlassian-cache-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>${org.junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- Bitbucket FuncTest helpers only work within the context of JUnit 4, so pull in vintage to run them-->
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>${org.junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${org.junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>${org.junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.mockk</groupId>
            <artifactId>mockk</artifactId>
            <version>${mockk.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.mockk</groupId>
            <artifactId>mockk-dsl-jvm</artifactId>
            <version>${mockk.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${assertj-core.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <version>${atlassian.rest.common.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.wink</groupId>
            <artifactId>wink-client</artifactId>
            <version>1.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bitbucket.server</groupId>
            <artifactId>bitbucket-it-common</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>4.3.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>4.3.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
            <scope>test</scope>
        </dependency>
        <!-- Make it clear that @Component (Via @BitbucketComponent) is provided for the purposes of javadoc -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk8</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jdk7</artifactId>
            <version>${kotlin.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-reflect</artifactId>
            <version>${kotlin.version}</version>
        </dependency>

        <dependency>
            <groupId>com.atlassian.marketplace</groupId>
            <artifactId>marketplace-client-java</artifactId>
            <version>3.1.4</version>
            <scope>provided</scope>
        </dependency>

        <!-- Shared MPT pre-flight checks library -->
        <dependency>
            <groupId>com.atlassian.cmpt</groupId>
            <artifactId>cmpt-spring-boot-check</artifactId>
            <version>${cmpt.shared.library.version}</version>
            <scope>compile</scope>
            <exclusions>
                <!--
                    Don't include a copy of `org.codehaus.jackson` in our plugin. The JSON annotations
                    (e.g. @JsonCreator) need to come from the host to ensure that the REST framework
                    is able to de-serialise any of our beans. Including a copy of `org.codehaus.jackson`
                    will mean the JSON annotations are not the ones the host expects (i.e they come from
                    our classloader) and as such will not work.
                -->
                <exclusion>
                    <groupId>org.codehaus.jackson</groupId>
                    <artifactId>jackson-mapper-asl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cmpt</groupId>
            <artifactId>cmpt-spring-boot-validation</artifactId>
            <version>${cmpt.shared.library.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bcma</groupId>
            <artifactId>bitbucket-migration-datatypes</artifactId>
            <version>${bitbucket-migration-datatypes.version}</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cmpt</groupId>
            <artifactId>cmpt-spring-boot-domain</artifactId>
            <version>${cmpt.shared.library.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.cmpt</groupId>
            <artifactId>cmpt-spring-boot-crypto</artifactId>
            <version>${cmpt.shared.library.version}</version>
            <scope>compile</scope>
        </dependency>
        <!-- Shared MPT analytics library -->
        <dependency>
            <groupId>com.atlassian.cmpt</groupId>
            <artifactId>cmpt-spring-boot-analytics-server-model</artifactId>
            <version>${cmpt.shared.library.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.datatype</groupId>
            <artifactId>jackson-datatype-jsr310</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.databind.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-kotlin</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.module</groupId>
            <artifactId>jackson-module-parameter-names</artifactId>
            <version>${jackson.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>atlassian-app-cloud-migration-osgi</artifactId>
            <version>${app.cloud.migration.osgi.version}</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian</groupId>
            <artifactId>app-migration-assistant</artifactId>
            <version>${app.migration.assistant.version}</version>
            <scope>compile</scope>
            <exclusions>
                <!--
                    Don't include a copy of `org.codehaus.jackson` in our plugin. The JSON annotations
                    (e.g. @JsonCreator) need to come from the host to ensure that the REST framework
                    is able to de-serialise any of our beans. Including a copy of `org.codehaus.jackson`
                    will mean the JSON annotations are not the ones the host expects (i.e they come from
                    our classloader) and as such will not work.
                -->
                <exclusion>
                    <groupId>org.codehaus.jackson</groupId>
                    <artifactId>jackson-core-asl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-spi</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient-osgi</artifactId>
            <version>4.5.13</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <!--
                Server provides org.apache.felix:org.osgi.compendium in the parent POM. We use this version because
                kotlin 1.4.30 compiler was raising an ArrayIndexOutOfBounds exception with compiling under JDK
            -->
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>4.3.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-spi</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
                                <sourceDir>${project.basedir}/src/main/java</sourceDir>
                            </sourceDirs>
                            <compilerPlugins>
                                <plugin>spring</plugin>
                            </compilerPlugins>
                        </configuration>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                        <configuration>
                            <skip>false</skip>
                            <sourceDirs>
                                <sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
                                <sourceDir>${project.basedir}/src/test/java</sourceDir>
                            </sourceDirs>
                        </configuration>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>1.8</jvmTarget>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kotlin-maven-allopen</artifactId>
                        <version>${kotlin.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <!--
                Taken from https://kotlinlang.org/docs/maven.html#compile-kotlin-and-java-sources to enable
                Java and Kotlin sources in the same project
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <!-- Replacing default-compile as it is treated specially by maven -->
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <!-- Replacing default-testCompile as it is treated specially by maven -->
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>java-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>java-test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                        <configuration>
                            <skip>${maven.test.skip}</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>bitbucket-maven-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <products>
                        <product>
                            <id>bitbucket</id>
                            <instanceId>bitbucket</instanceId>
                            <version>${bitbucket.version}</version>
                            <dataVersion>${bitbucket.data.version}</dataVersion>
                        </product>
                        <product>
                            <id>bitbucket</id>
                            <instanceId>bitbucket-node-1</instanceId>
                            <version>${bitbucket.version}</version>
                            <dataVersion>${bitbucket.data.version}</dataVersion>
                            <!-- override the HTTP port used for this node -->
                            <httpPort>7990</httpPort>
                            <!-- override the AJP port used for this node -->
                            <ajpPort>8009</ajpPort>
                            <systemPropertyVariables>
                                <server.port>7990</server.port>
                                <bitbucket.shared.home>${project.basedir}/target/bitbucket-node-1/home/shared</bitbucket.shared.home>
                                <!-- override the SSH port used for this node -->
                                <plugin.ssh.port>4330</plugin.ssh.port>
                                <!-- override database settings so both nodes use a single database -->
                                <jdbc.driver>org.postgresql.Driver</jdbc.driver>
                                <jdbc.url>jdbc:postgresql://localhost:5432/postgres</jdbc.url>
                                <jdbc.user>bitbucket</jdbc.user>
                                <jdbc.password>bitbucket</jdbc.password>
                                <!-- allow this node to find other nodes via TCP/IP -->
                                <hazelcast.network.tcpip>true</hazelcast.network.tcpip>
                                <!-- set to true if your load balancer supports stick sessions -->
                                <hazelcast.http.stickysessions>false</hazelcast.http.stickysessions>
                            </systemPropertyVariables>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>org.postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <version>42.3.1</version>
                                </libArtifact>
                            </libArtifacts>
                        </product>
                        <!-- Node 2 -->
                        <product>
                            <id>bitbucket</id>
                            <instanceId>bitbucket-node-2</instanceId>
                            <version>${bitbucket.version}</version>
                            <dataVersion>${bitbucket.data.version}</dataVersion>
                            <!-- override the HTTP port used for this node -->
                            <httpPort>7991</httpPort>
                            <!-- override the AJP port used for this node -->
                            <ajpPort>8010</ajpPort>
                            <systemPropertyVariables>
                                <server.port>7991</server.port>
                                <bitbucket.shared.home>${project.basedir}/target/bitbucket-node-1/home/shared</bitbucket.shared.home>
                                <!-- override the SSH port used for this node -->
                                <plugin.ssh.port>4331</plugin.ssh.port>
                                <!-- override database settings so both nodes use a single database -->
                                <jdbc.driver>org.postgresql.Driver</jdbc.driver>
                                <jdbc.url>jdbc:postgresql://localhost:5432/postgres</jdbc.url>
                                <jdbc.user>bitbucket</jdbc.user>
                                <jdbc.password>bitbucket</jdbc.password>
                                <!-- allow cluster nodes to find each other over TCP/IP thus enabling clustering for this node -->
                                <hazelcast.network.tcpip>true</hazelcast.network.tcpip>
                                <!-- set to true if your load balancer supports stick sessions -->
                                <hazelcast.http.stickysessions>false</hazelcast.http.stickysessions>
                            </systemPropertyVariables>
                            <libArtifacts>
                                <libArtifact>
                                    <groupId>org.postgresql</groupId>
                                    <artifactId>postgresql</artifactId>
                                    <version>42.3.1</version>
                                </libArtifact>
                            </libArtifacts>
                        </product>
                    </products>
                    <testGroups>
                        <testGroup>
                            <id>default</id>
                            <productIds>
                                <productId>bitbucket</productId>
                            </productIds>
                        </testGroup>
                        <testGroup>
                            <id>dc</id>
                            <productIds>
                                <productId>bitbucket-node-1</productId>
                                <productId>bitbucket-node-2</productId>
                            </productIds>
                            <includes>
                                <include>none</include>
                            </includes>
                        </testGroup>
                    </testGroups>
                    <compressResources>false</compressResources>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Import-Package>
                            !sun.misc,
                            !org.jvnet.hudson.annotation_indexer,
                            com.atlassian.bitbucket.user,
                            <!-- This package is not available in BBS > 8.0 causing a runtime error, preventing plugin to be loaded.
                            Classes in this package are used just in git push api for bbs < 7.11, so we don't need it to be loaded for bbs > 8.0 -->
                            com.atlassian.utils.process;resolution:=optional,
                            *
                        </Import-Package>
                        <Spring-Context>*</Spring-Context>
                        <!-- The package was renamed from com.atlassian.bitbucket.migration to com.atlassian.bitbucket.plugin.bcma
                        The Bundle-SymbolicName is used to derive the ActiveObject table suffix. So we're hard-coding the old value
                        to make sure we still refer to the same table, and don't lose data after the rename. -->
                        <Bundle-SymbolicName>com.atlassian.bitbucket.migration.bitbucket-migration-plugin</Bundle-SymbolicName>
                    </instructions>
                    <enableQuickReload>true</enableQuickReload>
                    <extractDependencies>false</extractDependencies>
                    <skipRestDocGeneration>true</skipRestDocGeneration>
                    <systemPropertyVariables>
                        <bcma.server.type>dev</bcma.server.type>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${maven.clean.plugin.version}</version>
                <executions>
                    <execution>
                        <id>clean-fe-resources</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                        <configuration>
                            <excludeDefaultDirectories>true</excludeDefaultDirectories>
                            <filesets>
                                <fileset>
                                    <directory>${basedir}/target/classes/fe-resources</directory>
                                </fileset>
                            </filesets>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven.resources.plugin.version}</version>
                <executions>
                    <execution>
                        <id>copy-fe-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${basedir}/target/classes/fe-resources</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${basedir}/../bitbucket-migration-plugin-ui/build</directory>
                                    <filtering>false</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.sonarsource.scanner.maven</groupId>
                <artifactId>sonar-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.7</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <!-- attached to Maven test phase -->
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <!-- Production build profile -->
        <profile>
            <id>production</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.eirslett</groupId>
                        <artifactId>frontend-maven-plugin</artifactId>
                        <version>${frontend.maven.plugin.version}</version>
                        <configuration>
                            <!-- If you update these node and yarn, please also update `.nvmrc` and `migration-ui/package.json` `engines` field -->
                            <nodeVersion>v12.22.9</nodeVersion>
                            <yarnVersion>v1.22.17</yarnVersion>
                            <workingDirectory>${basedir}/../bitbucket-migration-plugin-ui/</workingDirectory>
                            <installDirectory>target</installDirectory>
                        </configuration>
                        <executions>
                            <execution>
                                <id>Install node and yarn</id>
                                <goals>
                                    <goal>install-node-and-yarn</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>yarn install</id>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>install</arguments>
                                </configuration>
                            </execution>
                            <execution>
                                <id>build front end</id>
                                <goals>
                                    <goal>yarn</goal>
                                </goals>
                                <configuration>
                                    <arguments>build</arguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
