<?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.25</version>
    </parent>

    <groupId>com.atlassian.plugins</groupId>
    <artifactId>jquery</artifactId>
    <version>1.10.2-atlassian-3</version>

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

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-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>${project.groupId}.${project.artifactId}</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>
                <groupId>org.apache.maven.plugins</groupId>
                <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>6.3.15</amps.version>

        <frontend.maven.plugin.version>1.6</frontend.maven.plugin.version>
        <nodeVersion>v8.11.3</nodeVersion>
        <yarnVersion>v1.9.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/1.10.2-atlassian-3</tag>
    </scm>
</project>
