<?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>
        <artifactId>public-pom</artifactId>
        <groupId>com.atlassian.pom</groupId>
        <version>5.0.29</version>
    </parent>

    <groupId>com.atlassian.plugins</groupId>
    <artifactId>jquery</artifactId>
    <version>3.6.0.1</version>

    <name>jquery</name>
    <description>Atlassian plugin wrapper containing only jQuery.</description>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>amps-maven-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <!-- JS are minified by FrontEnd tools (take a look at frontend-maven-plugin and package.json) -->
                    <compressJs>false</compressJs>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Spring-Context>*</Spring-Context>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <tagNameFormat>release/@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
            <plugin>
                <!-- Install front-end modules and run ESLint -->
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
                <version>${frontend.maven.plugin.version}</version>
                <configuration>
                    <nodeVersion>${nodeVersion}</nodeVersion>
                    <yarnVersion>${yarnVersion}</yarnVersion>
                    <installDirectory>${frontend.maven.plugin.install.directory}</installDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>install-node-and-yarn</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>install-node-and-yarn</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>install-dependencies</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>${yarn.cmd.install}</arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>minify-js</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>yarn</goal>
                        </goals>
                        <configuration>
                            <arguments>minify</arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <amps.version>8.1.2</amps.version>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <frontend.maven.plugin.version>1.9.1</frontend.maven.plugin.version>
        <nodeVersion>v14.8.0</nodeVersion>
        <yarnVersion>v1.22.4</yarnVersion>
        <nodePath>${project.build.directory}</nodePath>
        <yarn.cmd.install>install --frozen-lockfile --prefer-offline --mutex network --no-progress</yarn.cmd.install>
    </properties>

    <scm>
        <connection>scm:git:ssh://git@bitbucket.org/atlassian/atlassian-plugins-jquery.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org/atlassian/atlassian-plugins-jquery.git</developerConnection>
        <url>https://bitbucket.org/atlassian/atlassian-plugins-jquery</url>
        <tag>release/3.6.0.1</tag>
    </scm>

    <issueManagement>
        <system>Jira</system>
        <url>https://ecosystem.atlassian.net/browse/JQUERY</url>
    </issueManagement>
</project>
