<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.marschall</groupId>
  <artifactId>string-dedup-parser</artifactId>
  <version>0.3.0</version>
  <inceptionYear>2016</inceptionYear>
  <name>String Deduplication Log Parser</name>
  <description>Parses HotSpot string deduplication logs.</description>

  <url>https://github.com/marschall/string-dedup-parser</url>

  <scm>
    <connection>scm:git:git@github.com:marschall/string-dedup-parser.git</connection>
    <developerConnection>scm:git:git@github.com:marschall/string-dedup-parser.git</developerConnection>
    <url>${project.url}</url>
    <tag>0.3.0</tag>
  </scm>

  <developers>
    <developer>
      <id>marschall</id>
      <name>Philippe Marschall</name>
      <email>philippe.marschall@gmail.com</email>
      <timezone>Europe/Zurich</timezone>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>MIT</name>
      <url>http://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <ciManagement>
    <system>Travis</system>
    <url>https://travis-ci.org/marschall/string-dedup-parser</url>
  </ciManagement>

  <issueManagement>
    <url>https://github.com/marschall/string-dedup-parser/issues</url>
    <system>GitHub Issues</system>
  </issueManagement>

  <dependencies>
    <dependency>
      <groupId>com.github.marschall</groupId>
      <artifactId>line-parser</artifactId>
      <version>0.4.2</version>
    </dependency>
    <dependency>
      <groupId>com.github.marschall</groupId>
      <artifactId>charsequences</artifactId>
      <version>0.4.2</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.12</version>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links>
            <link>https://docs.oracle.com/javase/8/docs/api/</link>
          </links>
          <!-- https://issues.apache.org/jira/browse/MJAVADOC-489 -->
          <sourceFileExcludes>
            <sourceFileExclude>module-info.java</sourceFileExclude>
          </sourceFileExcludes>
          <source>1.8</source>
        </configuration>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <configuration>
          <transformers>
            <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
              <manifestEntries>
                <Main-Class>com.github.marschall.stringdedupparser.Main</Main-Class>
              </manifestEntries>
            </transformer>
          </transformers>
          <shadedArtifactAttached>true</shadedArtifactAttached>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>shade</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <arguments>-Pdeploy-to-sonatype-oss</arguments>
        </configuration>
      </plugin>
    </plugins>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.4</version>
          <dependencies>
            <!-- jigsaw hack -->
            <dependency>
              <groupId>commons-lang</groupId>
              <artifactId>commons-lang</artifactId>
              <version>2.6</version>
            </dependency>
          </dependencies>
        </plugin>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.0.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.0.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.6</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.20</version>
        </plugin>
        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.9.5</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>
    <profile>
      <id>deploy-to-sonatype-oss</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>jdk9</id>
      <activation>
        <jdk>9</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-compiler-plugin</artifactId>
            <executions>
              <execution>
                <id>default-compile</id>
                <configuration>
                  <!-- compile everything to ensure module-info contains 
                    right entries -->
                  <!-- required when JAVA_HOME is JDK 8 or below -->
                  <jdkToolchain>
                    <version>9</version>
                  </jdkToolchain>
                  <release>9</release>
                </configuration>
              </execution>
              <execution>
                <id>base-compile</id>
                <goals>
                  <goal>compile</goal>
                </goals>
                <!-- recompile everything for target VM except the module-info.java -->
                <configuration>
                  <excludes>
                    <exclude>module-info.java</exclude>
                  </excludes>
                  <jdkToolchain>
                    <version>9</version>
                  </jdkToolchain>
                  <release>8</release>
                </configuration>
              </execution>
            </executions>
            <!-- defaults for compile and testCompile -->
            <configuration>
              <!-- jdkToolchain required when JAVA_HOME is JDK 9 or above -->
              <jdkToolchain>
                <version>9</version>
              </jdkToolchain>
              <release>8</release>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <!-- https://github.com/travis-ci/travis-ci/issues/4178 -->
      <!-- https://github.com/travis-ci/travis-ci/issues/5520 -->
      <id>travis</id>
      <activation>
        <property>
          <name>env.TRAVIS</name>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <!-- can't use toolchains https://github.com/travis-ci/travis-ci/issues/2727 -->
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <source>${java.version}</source>
              <target>${java.version}</target>
              <excludes>
                <exclude>module-info.java</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <java.version>1.8</java.version>
  </properties>

</project>
