<?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>fr.jcgay.maven</groupId>
        <artifactId>jcgay-build-configuration</artifactId>
        <version>1.18</version>
    </parent>

    <groupId>fr.jcgay.maven.plugins</groupId>
    <artifactId>buildplan-maven-plugin</artifactId>
    <version>1.5</version>
    <packaging>maven-plugin</packaging>
    <name>BuildPlan Maven Plugin</name>
    <description>The BuildPlan Plugin can inspect your project lifecycle.</description>

    <inceptionYear>2012</inceptionYear>
    <url>http://buildplan.jcgay.fr</url>

    <scm>
        <url>https://github.com/jcgay/buildplan-maven-plugin.git</url>
        <connection>scm:git:git://github.com/jcgay/buildplan-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:jcgay/buildplan-maven-plugin.git</developerConnection>
        <tag>v1.5</tag>
    </scm>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>3.20.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>3.0.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>3.0.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.6.1</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>11.0.2</version>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <configuration>
                        <append>true</append>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
                <executions>
                    <execution>
                        <id>mojo-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-goal</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>3.0</version>
                <configuration>
                    <header>com/mycila/licenses/APACHE-2</header>
                    <properties>
                        <owner>Jean-Christophe Gay</owner>
                        <year>${project.inceptionYear}</year>
                        <email>contact@jeanchristophegay.com</email>
                    </properties>
                    <excludes>
                        <exclude>**/README</exclude>
                        <exclude>pom.xml</exclude>
                        <exclude>src/test/resources/**</exclude>
                        <exclude>src/main/resources/**</exclude>
                        <exclude>src/site/**</exclude>
                        <exclude>.editorconfig</exclude>
                        <exclude>etc/*</exclude>
                        <exclude>src/it/**</exclude>
                        <exclude>.github/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.mycila</groupId>
                        <artifactId>licenses</artifactId>
                        <version>1</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-markdown</artifactId>
                        <version>1.10</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>default-deploy</id>
                        <phase>none</phase>
                    </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>
                    <repositoryOwner>jcgay</repositoryOwner>
                    <repositoryName>buildplan-maven-plugin</repositoryName>
                    <server>github</server>
                </configuration>
                <executions>
                    <execution>
                        <phase>site-deploy</phase>
                        <goals>
                            <goal>site</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <goals>deploy site-deploy</goals>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-invoker-plugin</artifactId>
                <version>3.2.2</version>
                <configuration>
                    <projectsDirectory>src/it</projectsDirectory>
                    <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
                    <settingsFile>src/it/settings.xml</settingsFile>
                    <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                    <cloneClean>true</cloneClean>
                    <showVersion>true</showVersion>
                    <postBuildHookScript>verify.groovy</postBuildHookScript>
                    <mavenOpts>${argLine}</mavenOpts>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>install</goal>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>3.1.2</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>dependency-management</report>
                            <report>ci-management</report>
                            <report>issue-management</report>
                            <report>licenses</report>
                            <report>distribution-management</report>
                            <report>summary</report>
                            <report>scm</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.6.1</version>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>build-with-toolchains</id>
            <activation>
                <jdk>!1.8</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-toolchains-plugin</artifactId>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>toolchain</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <toolchains>
                                <jdk>
                                    <version>${maven.compiler.target}</version>
                                </jdk>
                            </toolchains>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
