<?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>io.takari</groupId>
        <artifactId>takari</artifactId>
        <version>25</version>
    </parent>

    <groupId>com.facebook.presto</groupId>
    <artifactId>presto-maven-plugin</artifactId>
    <version>0.7</version>
    <packaging>takari-maven-plugin</packaging>

    <name>Presto Maven Build Extension</name>
    <description>The Presto Maven Plugin provides a packing and lifecycle for Presto plugins</description>
    <url>https://github.com/prestodb/presto-maven-plugin</url>

    <properties>
        <mavenVersion>3.8.1</mavenVersion>
        <mavenPluginPluginVersion>3.2</mavenPluginPluginVersion>
        <provisioVersion>1.0.18</provisioVersion>
        <takari.javaSourceVersion>1.8</takari.javaSourceVersion>

        <!-- declare language version for IntelliJ IDEA -->
        <maven.compiler.source>${takari.javaSourceVersion}</maven.compiler.source>
        <maven.compiler.target>${takari.javaSourceVersion}</maven.compiler.target>
    </properties>

    <prerequisites>
        <maven>[3.2.1,)</maven>
    </prerequisites>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${mavenVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${mavenPluginPluginVersion}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${mavenVersion}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.eclipse.aether</groupId>
            <artifactId>aether-api</artifactId>
            <version>1.1.0</version>
        </dependency>

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>14.0.1</version>
        </dependency>

        <dependency>
            <groupId>com.facebook.presto</groupId>
            <artifactId>presto-spi</artifactId>
            <version>0.289</version>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.0.24</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>3.2.3</version>
        </dependency>

        <!-- for testing -->
        <dependency>
            <groupId>io.takari.maven.plugins</groupId>
            <artifactId>takari-plugin-testing</artifactId>
            <version>2.9.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.takari.maven.plugins</groupId>
            <artifactId>takari-plugin-integration-testing</artifactId>
            <version>2.9.1</version>
            <type>pom</type>
            <scope>test</scope>
        </dependency>

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

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/resources-filtered</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </build>

    <profiles>
        <profile>
            <id>takari-release</id>
            <build>
                <plugins>
                    <!-- oss requires a javadoc jar. Build one when releasing. -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <!--  We want to sign the artifact, the POM, and all attached artifacts for oss upload  -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.4</version>
                        <configuration>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                            <passphrase>${GPG_PASSPHRASE}</passphrase>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>deploy-to-ossrh</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

  <scm>
    <tag>presto-maven-plugin-0.7</tag>
  </scm>
</project>
