<?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>co.macrometa.c8jamm</groupId>
  <artifactId>c8jamm</artifactId>
  <version>0.4.0</version>

  <name>c8jamm</name>
  <description>C8 Jamm Library</description>
  <url>http://maven.apache.org</url>

  <licenses>
		<license>
			<name>Apache License 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.plugin.version>3.6.2</maven.compiler.plugin.version>
    <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
    <maven.release.plugin.version>2.5.3</maven.release.plugin.version>
    <java.version>1.8</java.version>
    <junit.version>4.13.1</junit.version>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <!-- javadoc -->
		<javadoc.opts />
  </properties>

  <developers>
		<developer>
			<name>Macrometa</name>
			<url>https://github.com/macrometacorp</url>
		</developer>
	</developers>

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

  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <sourceDirectory>${basedir}/src</sourceDirectory>
    <testSourceDirectory>${basedir}/test</testSourceDirectory>
    <pluginManagement>
      <plugins>
          <!-- compiler plugin configuration -->
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>${maven.compiler.plugin.version}</version>
              <configuration>
                  <source>${maven.compiler.source}</source>
                  <target>${maven.compiler.source}</target>
              </configuration>
          </plugin>

          <!-- surefire plugin configuration -->
          <!-- The jar file listed in the argLine needs to be a pre-built version of the c8jamm -->
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <version>${maven.surefire.plugin.version}</version>
              <configuration>
                  <testSourceDirectory>${project.build.testSourceDirectory}</testSourceDirectory>
                  <testClassesDirectory>${project.build.testOutputDirectory}</testClassesDirectory>
                  <argLine>-javaagent:${user.home}/.m2/repository/co/macrometa/c8jamm/c8jamm/0.3.4-SNAPSHOT/c8jamm-0.3.4-SNAPSHOT.jar</argLine>
                  <includes>
                      <include>**/*Test.java</include>
                  </includes>
                  <useFile>false</useFile>
                  <forkMode>once</forkMode>
              </configuration>
          </plugin>

          <!-- release plugin configuration -->
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-release-plugin</artifactId>
              <version>${maven.release.plugin.version}</version>
              <configuration>
                  <preparationGoals>clean install -Pdocumentation-deploy</preparationGoals>
                  <autoVersionSubmodules>true</autoVersionSubmodules>
              </configuration>
          </plugin>

          <!-- jar plugin configuration -->
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-jar-plugin</artifactId>
              <configuration>
                  <archive>
                      <manifest>
                          <addClasspath>true</addClasspath>
                      </manifest>
                      <manifestEntries>
                        <Implementation-Title>c8jamm</Implementation-Title>
                        <url>https://github.com/Macrometacorp/c8jamm</url>
                        <Agent-Class>org.github.jamm.MemoryMeter</Agent-Class>
                        <Premain-Class>org.github.jamm.MemoryMeter</Premain-Class>
                        <Implementation-Version>0.4.0</Implementation-Version>
                        <Implementation-Vendor>Macrometa Corporation</Implementation-Vendor>
                      </manifestEntries>
                  </archive>
              </configuration>
          </plugin>

          <!-- deploy plugin configuration -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.8.2</version>
            <configuration>
              <uniqueVersion>false</uniqueVersion>
              <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
            </configuration>
			    </plugin>

          <!-- gpg plugin configuration -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
                <configuration>
                  <!-- This is necessary for gpg to not try to use the pinentry programs -->
                  <gpgArguments>
                    <arg>--pinentry-mode</arg>
                    <arg>loopback</arg>
                  </gpgArguments>
                </configuration>
              </execution>
            </executions>
          </plugin>

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

          <!-- resources plugin configuration -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <version>3.1.0</version>
            <configuration>
              <encoding>UTF-8</encoding>
              <tagNameFormat>v@{project.version}</tagNameFormat>
              <autoVersionSubmodules>true</autoVersionSubmodules>
              <releaseProfiles>releases</releaseProfiles>
            </configuration>
			    </plugin>

          <!-- source plugin configuration -->
			    <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.0.1</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
			    </plugin>

          <!-- javadoc plugin configuration -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.1.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <additionalOptions>${javadoc.opts}</additionalOptions>
                </configuration>
              </execution>
            </executions>
          </plugin>
      </plugins>
    </pluginManagement>
  </build>
  <scm>
		<url>https://github.com/Macrometacorp/c8jamm.git</url>
		<connection>scm:git:git@github.com:Macrometacorp/c8jamm.git</connection>
		<developerConnection>scm:git:git@github.com:Macrometacorp/c8jamm.git</developerConnection>
		<tag>c8jamm-0.4.0</tag>
	</scm>
  <organization>
		<name>Macrometa</name>
		<url>https://www.macrometa.co</url>
	</organization>
</project>
