<?xml version="1.0"?>
<!--
  ~ Copyright 2016 Inscope Metrics, Inc.
  ~
  ~ 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.
  -->
<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">
  <parent>
    <groupId>com.arpnetworking.commons</groupId>
    <artifactId>javassist-maven-parent</artifactId>
    <version>0.2.7</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>javassist-maven-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <name>Maven Javassist Plugin</name>
  <description>Maven Javassist Plugin.</description>
  <url>https://github.com/ArpNetworking/maven-javassist</url>

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

  <scm>
    <connection>scm:git:git@github.com:arpnetworking/maven-javassist.git</connection>
    <developerConnection>scm:git:git@github.com:arpnetworking/maven-javassist.git</developerConnection>
    <url>https://github.com/arpnetworking/maven-javassist</url>
    <tag>javassist-maven-parent-0.2.7</tag>
  </scm>

  <properties>
    <!--Dependency versions-->
    <spotbugs.annotations.version>4.7.3</spotbugs.annotations.version>
    <guava.version>32.0.0-jre</guava.version>
    <jsr305.version>3.0.2</jsr305.version>
    <maven.core.version>3.9.2</maven.core.version>
    <maven.model.version>3.9.2</maven.model.version>
    <maven.plugin.annotations.version>3.9.0</maven.plugin.annotations.version>
    <maven.plugin.api.version>3.9.2</maven.plugin.api.version>
    <maven.plugin.testing.harness.version>3.3.0</maven.plugin.testing.harness.version>
    <plexus.build.api.version>0.0.7</plexus.build.api.version>

    <!-- Plugin versions -->
    <maven-plugin-plugin.version>3.9.0</maven-plugin-plugin.version>
    <plexus-component-metadata.version>2.1.1</plexus-component-metadata.version>

    <!-- Code Coverage -->
    <jacoco.check.line.coverage>0.6</jacoco.check.line.coverage>
    <jacoco.check.branch.coverage>0.85</jacoco.check.branch.coverage>
  </properties>

  <build>
    <plugins>
      <!-- Enable Inherited Plugins -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.github.spotbugs</groupId>
        <artifactId>spotbugs-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>com.rimerosolutions.maven.plugins</groupId>
        <artifactId>wrapper-maven-plugin</artifactId>
        <inherited>false</inherited>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <configuration>
          <ignoredDependencies>
            <ignoredDependency>

            </ignoredDependency>
          </ignoredDependencies>
        </configuration>
      </plugin>

      <!-- Project Specific Plugins -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>${maven-plugin-plugin.version}</version>
        <configuration>
          <goalPrefix>javassist</goalPrefix>
          <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
        </configuration>
        <executions>
          <execution>
            <id>mojo-descriptor</id>
            <goals>
              <goal>descriptor</goal>
            </goals>
          </execution>
        </executions>
      </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>
    </plugins>
  </build>

  <dependencies>
    <!-- Essential -->
    <dependency>
      <groupId>org.javassist</groupId>
      <artifactId>javassist</artifactId>
      <version>${javassist.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.core.version}</version>
      <scope>provided</scope>
      <exclusions>
        <!-- TODO(ville): Maven core depends on Guice which depends on Guava; but android instead of jre -->
        <exclusion>
          <groupId>com.google.guava</groupId>
          <artifactId>guava</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.plugin.api.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-model</artifactId>
      <version>${maven.model.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.maven.plugin-tools</groupId>
      <artifactId>maven-plugin-annotations</artifactId>
      <version>${maven.plugin.annotations.version}</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.sonatype.plexus</groupId>
      <artifactId>plexus-build-api</artifactId>
      <version>${plexus.build.api.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.guava</groupId>
      <artifactId>guava</artifactId>
      <version>${guava.version}</version>
    </dependency>
    <dependency>
      <groupId>com.arpnetworking.commons</groupId>
      <artifactId>javassist-maven-core</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>com.google.code.findbugs</groupId>
      <artifactId>jsr305</artifactId>
      <version>${jsr305.version}</version>
    </dependency>
    <dependency>
      <groupId>com.github.spotbugs</groupId>
      <artifactId>spotbugs-annotations</artifactId>
      <version>${spotbugs.annotations.version}</version>
    </dependency>
    <!-- Test - General -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
      <exclusions>
        <!-- TODO(ville): Remove once JUnit depends on modern hamcrest; see:
            http://hamcrest.org/JavaHamcrest/distributables
        -->
        <exclusion>
          <groupId>org.hamcrest</groupId>
          <artifactId>hamcrest-core</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest</artifactId>
      <version>${hamcrest.version}</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>${mockito.version}</version>
      <scope>test</scope>
    </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>
      <exclusions>
        <!-- JUnit is a provided dependency -->
        <exclusion>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
</project>
