<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.pom</groupId>
        <artifactId>public-pom</artifactId>
        <version>8.0.35</version>
    </parent>

    <version>10.5.14</version>
    <groupId>com.atlassian.plugins.browser.metrics</groupId>
    <artifactId>dc-browser-metrics-parent</artifactId>
    <name>Atlassian Plugins - DC Browser Metrics - Parent</name>
    <packaging>pom</packaging>

    <licenses>
        <license>
            <name>Apache 2</name>
            <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@bitbucket.org:atlassian/dc-platform.git</connection>
        <developerConnection>scm:git:git@bitbucket.org:atlassian/dc-platform.git</developerConnection>
        <url>https://bitbucket.org/atlassian/dc-platform</url>
        <tag>dc-browser-metrics-10.5.14</tag>
    </scm>

    <modules>
        <module>packages/p2-plugin</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <configuration>
                        <tagNameFormat>dc-browser-metrics-@{project.version}</tagNameFormat>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.eirslett</groupId>
                    <artifactId>frontend-maven-plugin</artifactId>
                    <version>1.15.1-atlassian-6</version>
                    <configuration>
                        <installDirectory>${node.path}</installDirectory>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>

                <executions>
                    <execution>
                        <id>install node and corepack</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>install-node-and-corepack</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>install yarn deps</id>
                        <phase>initialize</phase>
                        <goals>
                            <goal>corepack</goal>
                        </goals>
                        <configuration>
                            <arguments>yarn install --immutable</arguments>
                        </configuration>
                        <inherited>false</inherited>
                    </execution>
                    <execution>
                        <id>build</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>corepack</goal>
                        </goals>
                        <configuration>
                            <arguments>yarn run build</arguments>
                        </configuration>
                        <inherited>false</inherited>
                    </execution>
                    <execution>
                        <id>test</id>
                        <phase>test</phase>
                        <goals>
                            <goal>corepack</goal>
                        </goals>
                        <configuration>
                            <arguments>yarn run test</arguments>
                        </configuration>
                        <inherited>false</inherited>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <!-- front-end dependencies -->
        <node.path>${project.basedir}/.node</node.path>
        <node.path.subpackage>${project.basedir}/../../.node</node.path.subpackage>
    </properties>

</project>