<?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.jira</groupId>
        <artifactId>jira-components</artifactId>
    <version>10.3.5</version>
    </parent>
    <artifactId>jira-plugins</artifactId>
    <name>Atlassian Jira - Plugins</name>
    <packaging>pom</packaging>
    <modules>
        <module>jira-analytics-whitelist-plugin</module>
        <module>jira-atst-healthcheck-plugin</module>
        <module>jira-statistics-plugin</module>
        <module>jira-gadgets-plugin</module>
        <module>jira-rest</module>
        <module>jira-oauth-consumer-spi-plugin</module>
        <module>jira-oauth-service-provider-spi-plugin</module>
        <module>jira-sal-plugin</module>
        <module>jira-admin-navigation-plugin</module>
        <module>jira-soy-plugin</module>
        <module>jira-view-issue-plugin</module>
        <module>jira-bundled-plugins</module>
        <module>jira-plugin-test-resources</module>
        <module>jira-func-test-plugin</module>
        <module>jira-reference-dependent-plugin</module>
        <module>jira-reference-plugin</module>
        <module>jira-reference-upgraded-plugin</module>
        <module>jira-reference-language-pack</module>
        <module>jira-reference-upgraded-language-pack</module>
        <module>jira-lookandfeel-plugin</module>
        <module>jira-ha-plugin</module>
        <module>jira-header-plugin</module>
        <module>jira-help-tips-plugin</module>
        <module>jira-application-properties-plugin</module>
        <module>jira-languages</module>
        <module>jira-share-plugin</module>
        <module>jira-issue-link-remote-jira-plugin</module>
        <module>jira-issue-link-web-plugin</module>
        <module>jira-issue-link-confluence-plugin</module>
        <module>jira-issue-link-applinks-common-plugin</module>
        <module>jira-my-home-plugin</module>
        <module>jira-less-integration</module>
        <module>jira-onboarding-assets-plugin</module>
        <module>jira-activeobjects-spi-plugin</module>
        <module>jira-postsetup-announcements-plugin</module>
        <module>jira-webhooks-plugin</module>
        <module>jira-feedback-plugin</module>
        <module>jira-project-config-plugin</module>
        <module>jira-core-reports-plugin</module>
        <module>jira-admin-updates-plugin</module>
        <module>jira-auditing-plugin</module>
        <module>jira-post-upgrade-landing-page-plugin</module>
        <module>jira-whisper-plugin</module>
        <module>jira-quicksearch-plugin</module>
        <module>jira-credits-plugin</module>
        <module>jira-apdex-plugin</module>
        <module>jira-diagnostics-plugin</module>
        <module>jira-webresources-plugin</module>
        <module>jira-frontend-plugin</module>
        <module>jira-index-analyzer-plugin</module>
        <module>jira-capabilities-plugin</module>
        <module>jira-cluster-monitoring-plugin</module>
        <module>jira-frontend-api</module>
        <module>jira-initial-watchers-plugin</module>
    </modules>
    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>${maven.bundle.plugin.version}</version>
                    <extensions>true</extensions>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>atlassian-pdk</artifactId>
                    <version>2.1.5</version>
                </plugin>
                <plugin>
                    <groupId>org.twdata.maven</groupId>
                    <artifactId>maven-cli-plugin</artifactId>
                    <version>1.0.4</version>
                    <configuration>
                        <commands>
                            <pi>clean resources compile jar org.apache.felix:maven-bundle-plugin:bundle com.atlassian.maven.plugins:atlassian-pdk:install</pi>
                            <pu>com.atlassian.maven.plugins:atlassian-pdk:uninstall</pu>
                            <package>clean resources compile jar</package>
                        </commands>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <configuration>
                        <skip>${maven.test.unit.skip}</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>jira-maven-plugin</artifactId>
                    <configuration>
                        <compressJs>false</compressJs>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>${frontend.maven.plugin.version}</version>
                    <configuration>
                        <!-- This will get executed in the context of direct children of the jira-plugins pom.xml file;
                             those children are 3 directories deep in to the project structure. -->
                        <installDirectory>${maven.multiModuleProjectDirectory}/target</installDirectory>
                        <workingDirectory>${maven.multiModuleProjectDirectory}/</workingDirectory>
                    </configuration>
                    <executions>
                        <execution>
                            <id>gulp process-resources</id>
                            <goals>
                                <goal>yarn</goal>
                            </goals>
                            <configuration>
                                <arguments>run process-resources --modulename ${project.artifactId} ${frontend.process.resources.args}</arguments>
                                <environmentVariables>
                                    <INSTRUMENT_JS_COVERAGE>${instrument.js.coverage}</INSTRUMENT_JS_COVERAGE>
                                </environmentVariables>
                            </configuration>
                            <phase>process-resources</phase>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <executable>${JAVA_HOME}/bin/javac</executable>
                    <!--fork>true</fork-->
                    <maxmem>256m</maxmem>
                </configuration>
            </plugin>

            <!--
              Ensure we don't execute frontend-maven-plugin plugin.

              Without this, it will be executed (because it is defined in the parent pom), using the
              configuration defined in this pom, in <pluginManagement>. And it will fail because the
              relative paths in that configuration are meant to work from the children poms, but not
              from here.
            -->
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
                <inherited>false</inherited>
            </plugin>

        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>atlassian-plugin.xml</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <excludes>
                    <exclude>atlassian-plugin.xml</exclude>
                    <!--
                        FRONTEND COMPILATION CONFIGURATION
                        This configuration is made in conjunction with Gulp via the frontend-maven-plugin.

                        Whatever files are ultimately processed via the frontend-maven-plugin (e.g., they are compiled
                        via Gulp) should be ignored here, otherwise they will be destroyed by Maven's default behaviours.

                        For what frontend files are compiled, see `gulpfile.js`.
                    -->
                    <exclude>**/*.js</exclude>
                    <!-- END FRONTEND COMPILATION CONFIGURATION -->
                </excludes>
            </resource>
        </resources>
    </build>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <scope>provided</scope>
        </dependency>
        <!--- force bom into reactor -->
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-bundled-plugins-bom</artifactId>
            <version>10.3.5</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-tests</artifactId>
                <version>${project.version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-rest-plugin</artifactId>
                <version>${project.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity</artifactId>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>jakarta.ws.rs-api</artifactId>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>io.swagger.core.v3</groupId>
                <artifactId>swagger-annotations</artifactId>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jclarion</groupId>
                <artifactId>image4j</artifactId>
                <version>0.7</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins</groupId>
                <artifactId>atlassian-plugins-osgi-javaconfig</artifactId>
                <version>0.5.2</version>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-bundled-plugins-bom</artifactId>
                <version>${project.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
            <dependency>
                <groupId>com.atlassian.jira</groupId>
                <artifactId>jira-internal-bom</artifactId>
                <version>${project.version}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>hardmode</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration combine.children="append">
                            <systemProperties combine.children="append">
                                <systemProperty>
                                    <key>atlassian.darkfeature.amd.loader.noglobals</key>
                                    <value>true</value>
                                </systemProperty>
                            </systemProperties>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-failsafe-plugin</artifactId>
                        <configuration combine.children="append">
                            <systemProperties combine.children="append">
                                <systemProperty>
                                    <key>atlassian.darkfeature.amd.loader.noglobals</key>
                                    <value>true</value>
                                </systemProperty>
                            </systemProperties>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>jira-maven-plugin</artifactId>
                        <configuration combine.children="append">
                            <systemPropertyVariables combine.children="append">
                                <atlassian.darkfeature.amd.loader.noglobals>true</atlassian.darkfeature.amd.loader.noglobals>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jacoco</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>report</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>less-css-compile</id>
            <activation>
                <property>
                    <name>!jira.lesscss.compile.skip</name>
                </property>
                <file>
                    <exists>src/main/resources</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.lesscss</groupId>
                        <artifactId>lesscss-maven-plugin</artifactId>
                        <configuration>
                            <webstatic>${project.basedir}/../../jira-webapp/src/main/webapp</webstatic>
                        </configuration>
                        <executions>
                            <execution>
                                <id>compile-less</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>compile</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jira-license-default-dc</id>
            <activation>
                <property>
                    <name>jira-license-default</name>
                    <value>dc</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>jira-maven-plugin</artifactId>
                        <configuration>
                            <products>
                                <product>
                                    <id>jira</id>
                                    <!-- Data Center commercial license, expiry 72H, Jira Software, unlimited users -->
                                    <license>
                                        AAACBA0ODAoPeNp9kl1v2jAUhu/zK460OyQHSLuVIkUaTbwNVBKUhEnbugsTDuA2sSPbgbFfPxOC1
                                        i+4yEXO5+vnPR+yGiGSW/CuoXc7vBoMvT4ENAOv5/WctUIUG1lVqNx7nqPQSJfccCl8GmU0mSXjl
                                        DpRXS5Qxau5RqV90ncCKQzLTcRK9Eu944Ip/cQ/M1MwrTkTbi5LZ1arfMM0hsyg7/X6A9LvE89z2
                                        j3ZvsJmQBBPpzQJxqP7U4r+qbjaN32zG+/baR2dMl6c35ei2qIah/4dvaHkOvzpkU/x5IZ8vbodO
                                        I9cMbdSclnnxj38EC1XZscUunYy36JvVI3OxGZmbZXdzwIU5lVJWi90rnjVQGoi70B873GNhPOQO
                                        51OFGfkS5yQWRKH8yAbxxGZp9Qm/EChpbGExR7MBqGdAlTkcokK7MMeMTfwa2NM9TDsdtfSfQGnW
                                        xw7CB47frsQShDSwJJro/iiNmgncw1GQl5rI0trtetY4sKgYCJ/Y4qVFSR0lNGQ3P04aDxrTKvWO
                                        jMXT0LuxCU33txaSiPffuRjr3fsO/mC6og/VmsmuGYN0Ij93TFYcVXunQaaDb4+wJbFd7vg0OI5I
                                        f53NENtoK2AlVQwGScjSFt5lrjdWymu8WEIgSwtppyzAsLgxRk8P5hG9PMA3bKiPspdsULjJRwX7
                                        ukf5/NX7TAtAhUAhQSHz9DgycOX7wcwERMJb3TLGb4CFGkB/xUWSRK3BZLrPF9Rn6ZmrUqJX02oc
                                    </license>
                                </product>
                            </products>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <atlassian.plugin.application.version.min>4.3</atlassian.plugin.application.version.min>
        <atlassian.plugin.application.version.max>4.3</atlassian.plugin.application.version.max>
        <atlassian.product.version>${project.version}</atlassian.product.version>
        <atlassian.pdk.server.url>http://localhost:8090/jira</atlassian.pdk.server.url>
        <atlassian.pdk.server.username>admin</atlassian.pdk.server.username>
        <atlassian.pdk.server.password>admin</atlassian.pdk.server.password>
    </properties>
</project>
