<?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>2018.1.1</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-2018.1.1</tag>
  </scm>

  <dependencies>
    <dependency>
      <groupId>org.zeroturnaround</groupId>
      <artifactId>jr-javassist</artifactId>
    </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>
        <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.3</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>
      </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</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-toolchains-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>toolchain</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <toolchains>
            <jdk>
              <version>1.8</version>
              <vendor>oracle</vendor>
            </jdk>
          </toolchains>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-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>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-toolchains-plugin</artifactId>
          <version>1.1</version>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        <plugin>
        	<groupId>org.eclipse.m2e</groupId>
        	<artifactId>lifecycle-mapping</artifactId>
        	<version>1.0.0</version>
        	<configuration>
        		<lifecycleMappingMetadata>
        			<pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>
                      net.orfjackal.retrolambda
                    </groupId>
                    <artifactId>
                      retrolambda-maven-plugin
                    </artifactId>
                    <versionRange>
                      [2.3.0,)
                    </versionRange>
                    <goals>
                      <goal>process-main</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
        				<pluginExecution>
        					<pluginExecutionFilter>
        						<groupId>
        							org.apache.maven.plugins
        						</groupId>
        						<artifactId>
        							maven-toolchains-plugin
        						</artifactId>
        						<versionRange>[1.1,)</versionRange>
        						<goals>
        							<goal>toolchain</goal>
        						</goals>
        					</pluginExecutionFilter>
        					<action>
        						<ignore />
        					</action>
        				</pluginExecution>
        			</pluginExecutions>
        		</lifecycleMappingMetadata>
        	</configuration>
        </plugin>
        <plugin>
          <groupId>net.orfjackal.retrolambda</groupId>
          <artifactId>retrolambda-maven-plugin</artifactId>
          <version>2.5.0</version>
          <executions>
            <execution>
              <goals>
                <goal>process-main</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <target>1.6</target>
            <fork>true</fork>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.1</version>
          <executions>
            <execution>
              <id>jacoco-initialize</id>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>jacoco-site</id>
              <phase>verify</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </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>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>zt-snapshots</id>
      <name>ZeroTurnaround Snapshots</name>
      <url>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::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>
