<?xml version="1.0" encoding="UTF-8"?>
<!--
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// © 2011-2022 Telenav, Inc.
// Licensed under Apache License, Version 2.0
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-->
<project xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xmlns = "http://maven.apache.org/POM/4.0.0"
         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.telenav.cactus</groupId>
        <artifactId>cactus</artifactId>
        <version>1.4.22</version>
    </parent>

    <artifactId>cactus-maven-plugin</artifactId>

    <packaging>maven-plugin</packaging>
    <description>
        The cactus-maven-plugin project codifies Telenav Open Source processes.
    </description>

    <properties>
        <enforcer.skip>true</enforcer.skip>
        <maven.javadoc.skip>true</maven.javadoc.skip>
        <mastfrog.version>2.8.3</mastfrog.version>
        <!-- this must be overridden here only to use the previous version,
             or it will fail trying to process itself while it is being built -->
        <cactus.maven.plugin.versions>${cactus.previous.version}</cactus.maven.plugin.versions>
    </properties>

    <dependencies>

        <!-- Cactus -->

        <dependency>
            <groupId>com.telenav.cactus</groupId>
            <artifactId>cactus-git</artifactId>
        </dependency>
        <dependency>
            <groupId>com.telenav.cactus</groupId>
            <artifactId>cactus-metadata</artifactId>
        </dependency>
        <dependency>
            <groupId>com.telenav.cactus</groupId>
            <artifactId>cactus-maven-xml</artifactId>
        </dependency>
        <dependency>
            <groupId>com.telenav.cactus</groupId>
            <artifactId>cactus-maven-versioning</artifactId>
        </dependency>
        <dependency>
            <groupId>com.telenav.cactus</groupId>
            <artifactId>cactus-codeflowers</artifactId>
        </dependency>

        <!-- Mastfrog -->

        <dependency>
            <groupId>com.mastfrog</groupId>
            <artifactId>util-streams</artifactId>
        </dependency>

        <!-- Maven -->

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven-jar-plugin.version}</version>
                <configuration>
                    <archive>
                        <manifestEntries>
                            <Automatic-Module-Name>cactus.maven.plugin</Automatic-Module-Name>
                        </manifestEntries>
                    </archive>
                </configuration>

            </plugin>

            <plugin>

                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <goalPrefix>cactus</goalPrefix>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>generated-helpmojo</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>

            </plugin>

        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>${maven.plugin.plugin.version}</version>
                </plugin>
            </plugins>

        </pluginManagement>
    </build>
</project>
