<?xml version="1.0"?>
<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.github.veithen</groupId>
        <artifactId>parent</artifactId>
        <version>5</version>
    </parent>

    <groupId>com.github.veithen.alta</groupId>
    <artifactId>alta-maven-plugin</artifactId>
    <version>0.6.2</version>
    <packaging>maven-plugin</packaging>

    <name>Alta Maven Plugin</name>
    <description>
        Maven plugin that takes as input a set of artifacts specified as a subset of the project dependencies or as an explicit list of artifacts and produces a set of outputs with information about these artifacts.
    </description>
    <url>http://veithen.github.io/alta/</url>
    <inceptionYear>2014</inceptionYear>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <prerequisites>
        <maven>${maven.version}</maven>
    </prerequisites>

    <scm>
        <url>https://github.com/veithen/alta/tree/master</url>
        <connection>scm:git:http://github.com/veithen/alta.git</connection>
        <developerConnection>scm:git:https://github.com/veithen/alta.git</developerConnection>
        <tag>0.6.2</tag>
    </scm>

    <properties>
        <github.repository>alta</github.repository>
        <maven.version>3.0</maven.version>
        <maven-plugin-plugin.version>3.3</maven-plugin-plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-artifact-transfer</artifactId>
            <version>0.9.1</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
            <version>0.30</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.modello</groupId>
                <artifactId>modello-maven-plugin</artifactId>
                <version>1.8.3</version>
                <configuration>
                    <version>1.0</version>
                    <models>
                        <model>src/main/mdo/artifact-sets.mdo</model>
                    </models>
                    <useJava5>true</useJava5>
                </configuration>
                <executions>
                    <execution>
                        <id>mdo</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>mdo-site</id>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>xdoc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.6.0</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                    <excludes>
                        <exclude>com/github/veithen/alta/Configuration.java</exclude>
                    </excludes>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${maven-plugin-plugin.version}</version>
                <executions>
                    <execution>
                        <!-- See MNG-5346 -->
                        <id>default-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </execution>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <version>2.5.1</version>
                <executions>
                    <execution>
                        <!-- Install the project artifact before the integration tests so that
                             they can use it. This avoids the complications related to setting
                             up a local repository for the invoker plugin. -->
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>install</goal>
                        </goals>
                        <configuration>
                            <skip>${skipTests}</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <projectsDirectory>src/it</projectsDirectory>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <pomIncludes>
                                <pomInclude>*/pom.xml</pomInclude>
                            </pomIncludes>
                            <postBuildHookScript>verify</postBuildHookScript>
                            <!-- We want to use Google Truth in verification scripts -->
                            <addTestClassPath>true</addTestClassPath>
                            <goals>
                                <goal>clean</goal>
                                <goal>verify</goal>
                            </goals>
                            <skipInvocation>${skipTests}</skipInvocation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <skipDeploy>true</skipDeploy>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <version>0.11</version>
                <configuration>
                    <message>Creating site for ${project.version}</message>
                    <server>github</server>
                    <repositoryOwner>veithen</repositoryOwner>
                    <repositoryName>alta</repositoryName>
                </configuration>
                <executions>
                    <execution>
                        <phase>site-deploy</phase>
                        <goals>
                            <goal>site</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <projectName>Alta Maven Plugin</projectName>
                    <licenseName>apache_v2</licenseName>
                    <extraExtensions>
                        <bsh>java</bsh>
                        <mdo>xml</mdo>
                    </extraExtensions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.7</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>scm</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${maven-plugin-plugin.version}</version>
            </plugin>
        </plugins>
    </reporting>
</project>
