<?xml version="1.0"?>
<!--
  #%L
  Alta Maven Plugin
  %%
  Copyright (C) 2014 - 2023 Andreas Veithen
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  #L%
  -->

<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>com.github.veithen</groupId>
        <artifactId>parent</artifactId>
        <version>46</version>
    </parent>

    <groupId>com.github.veithen.alta</groupId>
    <artifactId>alta-maven-plugin</artifactId>
    <version>0.8.0</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>

    <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.8.0</tag>
    </scm>

    <properties>
        <github.repository>alta</github.repository>
        <javaVersion>11</javaVersion>
        <project.build.outputTimestamp>2023-06-03T20:54:47Z</project.build.outputTimestamp>
        <maven.version>3.9.2</maven.version>
        <artifactset.resolver.version>0.2.0</artifactset.resolver.version>
    </properties>

    <dependencies>
        <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-plugin-api</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.github.veithen.maven.shared</groupId>
            <artifactId>artifact-set-resolver</artifactId>
            <version>${artifactset.resolver.version}</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.9.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.24.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>sonatype-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.reporting.outputDirectory}/code-coverage</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.veithen.maven</groupId>
                <artifactId>resolver-proxy-maven-plugin</artifactId>
                <version>0.4.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>start</goal>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-invoker-plugin</artifactId>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <!-- We want to use Google Truth in verification scripts -->
                            <addTestClassPath>true</addTestClassPath>
                            <goals>
                                <goal>clean</goal>
                                <goal>verify</goal>
                            </goals>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <configuration>
                    <skipDeploy>true</skipDeploy>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.github.veithen.maven.shared</groupId>
                                    <artifactId>artifact-set-resolver</artifactId>
                                    <version>${artifactset.resolver.version}</version>
                                    <classifier>xdoc</classifier>
                                    <type>jar</type>
                                    <outputDirectory>${project.build.directory}/generated-site/xdoc</outputDirectory>
                                    <includes>artifact-sets.xml</includes>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <version>0.12</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>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.veithen.maven</groupId>
                <artifactId>hermetic-maven-plugin</artifactId>
                <configuration>
                    <allowExec>true</allowExec>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.4.4</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>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>no-bootclasspath</id>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <configuration>
                            <pomExcludes>
                                <pomExclude>bootclasspath/pom.xml</pomExclude>
                            </pomExcludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
