<?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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.zeroturnaround</groupId>
  <artifactId>jr-pom</artifactId>
  <version>7.0.9</version>
  <packaging>pom</packaging>
  <name>JRebel</name>

  <scm>
    <connection>scm:hg:ssh://hg@bitbucket.org/zeroturnaround/jr-agent</connection>
    <developerConnection>scm:hg:ssh://hg@bitbucket.org/zeroturnaround/jr-agent</developerConnection>
    <tag>jr-pom-7.0.9</tag>
  </scm>

  <dependencies>
    <dependency>
      <groupId>org.zeroturnaround</groupId>
      <artifactId>jr-javassist</artifactId>
      <type>jar</type>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>jr-sdk</artifactId>
        <version>${project.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>jr-utils</artifactId>
        <version>${project.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.zeroturnaround</groupId>
        <artifactId>jr-javassist</artifactId>
        <version>${javassist-version}</version>
        <type>jar</type>
        <scope>provided</scope>
        <exclusions>
          <exclusion>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
          </exclusion>
        </exclusions>
      </dependency>
    </dependencies>
  </dependencyManagement>
  
  <build>
    <sourceDirectory>src</sourceDirectory>

    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <!-- enable "release" profile for modules -->
          <releaseProfiles>release</releaseProfiles>
          <checkModificationExcludes>
            <checkModificationExclude>jr-core/dist/jrebel.jar</checkModificationExclude>
          </checkModificationExcludes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.4</source>
          <target>1.4</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.3.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.7</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <forkMode>${surefire.forkmode}</forkMode>	
          <argLine>-Xms768m -Xmx768m -XX:MaxPermSize=256m</argLine>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.9.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.6.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>

    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>2.1</version>
      </extension>
    </extensions>
  </build>

  <properties>
    <javassist-version>3.21.0-GA-java4-zt</javassist-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <year>2014</year>
    <company>Zeroturnaround OU</company>
    <surefire.forkmode>once</surefire.forkmode>
    <zt.httpclient.version>0.1.10</zt.httpclient.version>
    <proguard.base.version>5.3.3</proguard.base.version>
    <proguard.maven.version>2.0.14</proguard.maven.version>
    <bouncycastle.artifactId>bcprov-jdk14</bouncycastle.artifactId>
    <bouncycastle.version>1.55</bouncycastle.version>
  </properties>


  <distributionManagement>
    <snapshotRepository>
      <id>zt-snapshots</id>
      <name>ZeroTurnaround Snapshots</name>
      <url>dav:https://repos.zeroturnaround.com/nexus/content/repositories/zt-snapshots</url>
      <layout>default</layout>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>zt-public-releases</id>
      <url>https://repos.zeroturnaround.com/nexus/content/repositories/zt-public-releases/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <modules>
    <module>jr-servlet-api</module>
    <module>jr-sdk</module>
    <module>jr-utils</module>
    <module>liferay-jr-plugin</module>
    <module>liferay-status-jr-plugin</module>
    <module>jr-parent</module>
  </modules>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <version>2.7</version>
            <configuration>
              <altDeploymentRepository>zt-releases::default::dav:https://repos.zeroturnaround.com/nexus/content/repositories/zt-public-releases</altDeploymentRepository>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <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>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <!-- http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html -->
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
