<?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>org.codehaus.mojo</groupId>
    <artifactId>mojo-parent</artifactId>
    <version>38</version>
  </parent>

  <groupId>com.github.cjnygard</groupId>
  <artifactId>rest-maven-plugin</artifactId>
  <version>0.1.4</version>
  <packaging>maven-plugin</packaging>

  <name>${project.groupId}:${project.artifactId}</name>

  <description>The REST Request Maven Plugin is meant to provide an
  easy way to interface to REST services via the POST operation to
  send data files to the REST URL and retrieve (and store) the
  results.</description>

  <!-- mvn -Prelease release:clean release:prepare -->
  <!-- mvn -Prelease release:perform -->
  <!-- cd target/checkout && mvn -Prelease nexus-staging:release -->
  <url>http://github.com/cjnygard/rest-maven-plugin</url>
  <licenses>
    <license>
      <name>The Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Carl Nygard</name>
      <email>cjnygard@gmail.com</email>
      <organization>Self</organization>
      <organizationUrl>http://github.com/cjnygard</organizationUrl>
    </developer>
  </developers>
  <scm>
    <developerConnection>scm:git:ssh://git@github.com/cjnygard/rest-maven-plugin.git</developerConnection>
    <connection>scm:git:https://github.com/cjnygard/rest-maven-plugin.git</connection>
    <url>https://github.com/cjnygard/rest-maven-plugin.git</url>
    <tag>rest-maven-plugin-0.1.4</tag>
  </scm>

  <properties>
    <!-- Turn off checkstyle formatting -->
    <!--netbeans.checkstyle.format>false</netbeans.checkstyle.format-->
    <netbeans.checkstyle.format>true</netbeans.checkstyle.format>

    <nexus-staging-maven-plugin.version>1.6.3</nexus-staging-maven-plugin.version>
    <maven-release-plugin.version>2.5</maven-release-plugin.version>
    <maven-core.version>3.3.9</maven-core.version>
    <maven-compat.version>3.3.9</maven-compat.version>
    <maven-model.version>3.3.9</maven-model.version>
    <maven-plugin-api.version>3.3.9</maven-plugin-api.version>
    <maven-project.version>2.2.1</maven-project.version>
    <maven-artifact.version>3.3.9</maven-artifact.version>
    <maven-aether-provider.version>3.3.9</maven-aether-provider.version>
    <maven-plugin-annotations.version>3.4</maven-plugin-annotations.version>
    <maven-plugin-tools-annotations.version>3.4</maven-plugin-tools-annotations.version>
    <maven-plugin-tools-api.version>3.4</maven-plugin-tools-api.version>
    <maven-plugin-testing-harness.version>3.3.0</maven-plugin-testing-harness.version>
    <maven-plugin-plugin.version>3.4</maven-plugin-plugin.version>
    <maven-checkstyle-plugin.version>2.16</maven-checkstyle-plugin.version>
    <maven-invoker-plugin.version>2.0.0</maven-invoker-plugin.version>
    <maven-gpg-plugin.version>1.5</maven-gpg-plugin.version>

    <jersey-client.version>2.22.1</jersey-client.version>
    <jersey-media-moxy.version>2.0</jersey-media-moxy.version>
    <jersey-json.version>1.19</jersey-json.version>
    <file-management.version>1.2</file-management.version>

    <!-- Plexus component versions -->
    <plexus-compiler-api.version>2.5</plexus-compiler-api.version>
    <plexus-utils.version>3.0.22</plexus-utils.version>
    <plexus-build-api.version>0.0.7</plexus-build-api.version>
    <plexus.version>3.0.22</plexus.version>
    <plexus-resources.version>1.0.1</plexus-resources.version>
    <plexus-io.version>2.6.1</plexus-io.version>
    <plexus-component-annotations.version>1.6</plexus-component-annotations.version>
    <plexus-component-metadata.version>1.6</plexus-component-metadata.version>
  </properties>

  <dependencies>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven-plugin-api.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven-core.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${maven-artifact.version}</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-compat</artifactId>
      <version>${maven-compat.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-aether-provider</artifactId>
      <version>${maven-aether-provider.version}</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-project</artifactId>
      <version>${maven-project.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${maven-model.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-tools-annotations</artifactId>
      <version>${maven-plugin-tools-annotations.version}</version>
    </dependency>

    <!-- dependencies to annotations -->
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${maven-plugin-annotations.version}</version>
      <!--
          Annotations are not needed for plugin execution.
          Therefore, use provided scope, to remove this from compile path.
      -->
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-tools-api</artifactId>
      <version>${maven-plugin-tools-api.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.plugin-testing</groupId>
      <artifactId>maven-plugin-testing-harness</artifactId>
      <version>${maven-plugin-testing-harness.version}</version>
      <scope>test</scope>
      <type>jar</type>
    </dependency>


    <!-- Plexus components dependencies.    -->
    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-compiler-api</artifactId>
      <version>${plexus-compiler-api.version}</version>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-utils</artifactId>
      <version>${plexus-utils.version}</version>
    </dependency>

    <dependency>
      <groupId>org.sonatype.plexus</groupId>
      <artifactId>plexus-build-api</artifactId>
      <version>${plexus-build-api.version}</version>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-resources</artifactId>
      <version>${plexus-resources.version}</version>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-io</artifactId>
      <version>${plexus-io.version}</version>
    </dependency>

    <dependency>
      <groupId>org.codehaus.plexus</groupId>
      <artifactId>plexus-component-annotations</artifactId>
      <version>${plexus-component-annotations.version}</version>
    </dependency>

    <dependency>
      <groupId>org.apache.maven.shared</groupId>
      <artifactId>file-management</artifactId>
      <version>${file-management.version}</version>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.core</groupId>
      <artifactId>jersey-client</artifactId>
      <version>${jersey-client.version}</version>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.connectors</groupId>
      <artifactId>jersey-grizzly-connector</artifactId>
      <version>${jersey-client.version}</version>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.connectors</groupId>
      <artifactId>jersey-apache-connector</artifactId>
      <version>${jersey-client.version}</version>
    </dependency>

    <dependency>
      <groupId>org.glassfish.jersey.connectors</groupId>
      <artifactId>jersey-jetty-connector</artifactId>
      <version>${jersey-client.version}</version>
    </dependency>

    <dependency>
      <groupId>com.sun.jersey</groupId>
      <artifactId>jersey-json</artifactId>
      <version>${jersey-json.version}</version>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.2.3</version>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.module</groupId>
      <artifactId>jackson-module-jaxb-annotations</artifactId>
      <version>2.4.0</version>
    </dependency>

    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.2.3</version>
    </dependency>

  </dependencies>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <profiles>
    <profile>
      <id>run-its</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>${maven-invoker-plugin.version}</version>
            <configuration>
              <debug>true</debug>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <cloneClean>true</cloneClean>
              <pomIncludes>
                <pomInclude>*/pom.xml</pomInclude>
              </pomIncludes>
              <addTestClassPath>true</addTestClassPath>
              <postBuildHookScript>verify</postBuildHookScript>
              <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
              <!--settingsFile>src/it/settings.xml</settingsFile-->
              <goals>
                <goal>clean</goal>
                <goal>compile</goal>
                <goal>package</goal>
              </goals>
            </configuration>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <version>${maven-release-plugin.version}</version>
            <configuration>
              <autoVersionSubmodules>true</autoVersionSubmodules>
              <useReleaseProfile>false</useReleaseProfile>
              <releaseProfiles>release</releaseProfiles>
              <goals>deploy</goals>
              <!--goals>deploy nexus-staging:release</goals-->
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>${nexus-staging-maven-plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>ossrh</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <autoReleaseAfterClose>false</autoReleaseAfterClose>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${maven-gpg-plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>reporting</id>
      <activation>
        <property>
          <name>skipReports</name>
          <value>!true</value>
        </property>
      </activation>
      <reporting>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-checkstyle-plugin</artifactId>
            <version>${maven-checkstyle-plugin.version}</version>
            <configuration>
              <skip>true</skip>
              <configLocation>config/maven_checks.xml</configLocation>
              <headerLocation>config/maven-header.txt</headerLocation>
            </configuration>
          </plugin>
        </plugins>
      </reporting>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
        <executions>
          <execution>
            <id>default-descriptor</id>
            <phase>process-classes</phase>
          </execution>
          <execution>
            <id>help-goal</id>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.plexus</groupId>
        <artifactId>plexus-component-metadata</artifactId>
        <version>${plexus-component-metadata.version}</version>
        <executions>
          <execution>
            <goals>
              <goal>generate-metadata</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <version>${maven-checkstyle-plugin.version}</version>
        <configuration>
          <configLocation>config/maven_checks.xml</configLocation>
          <headerLocation>config/maven-header.txt</headerLocation>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-shared-resources</artifactId>
            <version>2</version>
          </dependency>
        </dependencies>
      </plugin>

    </plugins>
  </build>

</project>
