<?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>

  <groupId>com.github.ekryd.reflection-utils</groupId>
  <artifactId>reflection-utils</artifactId>
  <version>1.1.0</version>
  <name>Reflection utils</name>
  <description>A utility library to handle Java reflection with ease</description>

  <prerequisites>
    <maven>3.0.4</maven>
  </prerequisites>

  <properties>
    <compileSource>1.6</compileSource>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <!-- Test dependencies -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-all</artifactId>
      <version>1.3</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <defaultGoal>install</defaultGoal>

    <plugins>
      <plugin>
        <groupId>com.github.ekryd.sortpom</groupId>
        <artifactId>sortpom-maven-plugin</artifactId>
        <version>2.4.0</version>
        <configuration>
          <createBackupFile>false</createBackupFile>
          <predefinedSortOrder>custom_1</predefinedSortOrder>
          <lineSeparator>\n</lineSeparator>
          <encoding>${project.build.sourceEncoding}</encoding>
          <sortProperties>true</sortProperties>
          <keepBlankLines>true</keepBlankLines>
          <sortDependencies>scope</sortDependencies>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>sort</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <source>${compileSource}</source>
          <target>${compileSource}</target>
        </configuration>
      </plugin>

      <!-- Release management -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5.1</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <arguments>-Pdistribution</arguments>
          <goals>deploy</goals>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.5</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>enforce-plugin-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requirePluginVersions>
                  <message>Best Practice is to always define plugin versions!</message>
                  <banLatest>true</banLatest>
                  <banRelease>true</banRelease>
                  <banSnapshots>true</banSnapshots>
                </requirePluginVersions>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <!-- Coverage -->
      <plugin>
        <groupId>org.eluder.coveralls</groupId>
        <artifactId>coveralls-maven-plugin</artifactId>
        <version>3.1.0</version>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.7.4.201502262128</version>
        <executions>
          <execution>
            <id>prepare-agent</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Define versions for standard plugins -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.6.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.7</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.18.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.5</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.5.2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.8.2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.4</version>
      </plugin>

      <plugin>
        <groupId>com.github.ekryd.echo-maven-plugin</groupId>
        <artifactId>echo-maven-plugin</artifactId>
        <version>1.2.0</version>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>welcome</id>
            <goals>
              <goal>echo</goal>
            </goals>
            <configuration>
              <fromFile>misc/welcome.txt</fromFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <!-- Misc -->
  <url>https://github.com/Ekryd/reflection-utils</url>
  <inceptionYear>2013</inceptionYear>

  <licenses>
    <license>
      <name>New BSD License</name>
      <url>http://en.wikipedia.org/wiki/BSD_licenses</url>
      <distribution>repo</distribution>
      <comments>Whatever</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>bjorn.ekryd</id>
      <name>Björn Ekryd</name>
      <email>bjorn.ekryd(at)gmail(dot)com</email>
      <url>http://www.linkedin.com/in/bjornekryd</url>
      <roles>
        <role>Architect</role>
        <role>Developer</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:https://github.com/Ekryd/reflection-utils.git</connection>
    <developerConnection>scm:git:https://github.com/Ekryd/reflection-utils.git</developerConnection>
    <tag>reflection-utils-1.1.0</tag>
    <url>https://github.com/Ekryd/reflection-utils</url>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/Ekryd/reflection-utils/issues</url>
  </issueManagement>

  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <!-- Profiles -->
  <profiles>
    <profile>
      <id>distribution</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.10.1</version>
            <configuration>
              <minmemory>128m</minmemory>
              <maxmemory>512</maxmemory>
              <breakiterator>true</breakiterator>
              <quiet>true</quiet>
              <source>${compileSource}</source>
              <verbose>false</verbose>
              <linksource>true</linksource>
              <links>
                <!-- JSE -->
                <link>http://docs.oracle.com/javase/6/docs/api/</link>
              </links>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadoc</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.4</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
