<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>com.github.ekryd.sortpom</groupId>
    <artifactId>sortpom-parent</artifactId>
    <version>2.15.0</version>
  </parent>

  <!-- Basics -->
  <artifactId>sortpom-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>SortPom Plugin</name>
  <description>A Maven plugin that sorts the pom.xml file.</description>

  <dependencies>
    <dependency>
      <groupId>com.github.ekryd.sortpom</groupId>
      <artifactId>sortpom-sorter</artifactId>
      <version>2.15.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>com.github.ekryd.echo-maven-plugin</groupId>
        <artifactId>echo-maven-plugin</artifactId>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>end</id>
            <goals>
              <goal>echo</goal>
            </goals>
            <phase>install</phase>
            <configuration>
              <message>${line.separator}       To run the plugin directly:${line.separator}       mvn ${project.groupId}:${project.artifactId}:${project.version}:sort${line.separator}</message>
            </configuration>
          </execution>
          <execution>
            <id>end_description</id>
            <goals>
              <goal>echo</goal>
            </goals>
            <phase>install</phase>
            <configuration>
              <message>${line.separator}       To view description:${line.separator}       mvn help:describe -DgroupId=${project.groupId} -DartifactId=${project.artifactId} -Dversion=${project.version} -Ddetail</message>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- See http://maven.apache.org/plugins/maven-invoker-plugin/examples/fast-use.html -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-invoker-plugin</artifactId>
        <executions>
          <execution>
            <id>integration-test</id>
            <goals>
              <goal>install</goal>
              <goal>run</goal>
            </goals>
            <configuration>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <settingsFile>src/it/settings.xml</settingsFile>
              <scriptVariables>
                <projectversion>${project.version}</projectversion>
              </scriptVariables>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
