<?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">
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.github.jbellis</groupId>
  <artifactId>jamm</artifactId>
  <packaging>jar</packaging>
  <version>0.4.0</version>
  <name>Java Agent for Memory Measurements</name>
  <description>
    Jamm provides MemoryMeter, a java agent to measure actual object memory use including JVM overhead.
  </description>
  <url>https://github.com/jbellis/jamm/</url>
  <scm>
    <connection>scm:git:git://github.com/jbellis/jamm.git</connection>
    <developerConnection>scm:git:git@github.com:jbellis/jamm.git</developerConnection>
    <url>http://github.com/jbellis/jamm/tree/master/</url>
  </scm>
  <issueManagement>
    <system>github</system>
    <url>http://github.com/jbellis/jamm/issues</url>
  </issueManagement>
  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.openjdk.jmh</groupId>
        <artifactId>jmh-core</artifactId>
        <version>1.36</version>
        <scope>test</scope>
    </dependency>
  </dependencies>
  <developers>
    <developer>
      <!-- see https://github.com/jbellis/jamm/pull/3 as to why I am publisher -->
      <id>stephenc</id>
      <name>Stephen Connolly</name>
      <roles>
        <role>publisher</role>
      </roles>
    </developer>
    <developer>
      <id>jbellis</id>
      <name>Jonathan Ellis</name>
      <roles>
        <role>architect</role>
      </roles>
    </developer>
    <developer>
      <id>belliottsmith</id>
      <name>Benedict Elliott Smith</name>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
    <developer>
      <id>mebigfatguy</id>
      <name>Dave Brosius</name>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
    <developer>
      <id>mshuler</id>
      <name>Michael Shuler</name>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
    <developer>
      <id>snazy</id>
      <name>Robert Stupp</name>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
    <developer>
      <id>blerer</id>
      <name>Benjamin Lerer</name>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
    <developer>
      <id>ekaterinadimitrova2</id>
      <name>Ekaterina Dimitrova</name>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>
  <properties>
    <jvmArgs></jvmArgs>
  </properties>
  <build>
    <sourceDirectory>${basedir}/src</sourceDirectory>
    <testSourceDirectory>${basedir}/test</testSourceDirectory>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.11.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.0.0-M7</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Premain-Class>org.github.jamm.MemoryMeter</Premain-Class>
            </manifestEntries>
          </archive>
        </configuration>
        <executions>
          <execution>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <jdkToolchain>
            <version>1.8</version>
            <vendor>Oracle Corporation</vendor>
          </jdkToolchain>
          <forkCount>1</forkCount>
          <reuseForks>false</reuseForks>
          <argLine> ${jvmArgs} -javaagent:${project.build.directory}/${project.build.finalName}-tests.${project.packaging}</argLine>
        </configuration>
        <executions>
          <execution>
            <id>test-jdk11</id>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <jdkToolchain>
                <version>11</version>
              </jdkToolchain>
            </configuration>
          </execution>
          <execution>
            <id>test-jdk17</id>
            <goals>
              <goal>test</goal>
            </goals>
            <configuration>
              <jdkToolchain>
                <version>17</version>
              </jdkToolchain>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>pw.krejci</groupId>
        <artifactId>jmh-maven-plugin</artifactId>
        <version>0.2.2</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.13</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-source-plugin</artifactId>
            <version>3.3.0</version>
            <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>
          <version>3.5.0</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.5</version>
          <executions>
            <execution>
              <id>sign-artifacts</id>
              <phase>verify</phase>
              <goals>
                <goal>sign</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
