<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.zeroturnaround</groupId>
  <artifactId>jr-pom</artifactId>
  <version>2026.1.2</version>
  <packaging>pom</packaging>
  <name>JRebel</name>

  <scm>
    <connection>scm:git:https://github.com/p4rebels/jr-agent.git</connection>
    <developerConnection>scm:git:https://github.com/p4rebels/jr-agent.git</developerConnection>
    <tag>jr-pom-2026.1.2</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>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <build>
    <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>
          <release>8</release>
        </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>3.3.1</version>
        <configuration>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.1.2</version>
          <configuration>
            <argLine>-Xms768m -Xmx768m --add-opens=java.base/java.lang=ALL-UNNAMED</argLine>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.5.0</version>
          <configuration>
            <createDependencyReducedPom>false</createDependencyReducedPom>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.4.1</version>
          <configuration>
            <additionalparam>-Xdoclint:none</additionalparam>
            <source>8</source>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.13.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.6.1</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <properties>
    <javassist-version>3.30.0-GA-zt</javassist-version>
    <jackson.version>2.13.5</jackson.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <year>2014</year>
    <company>Zeroturnaround OU</company>
  </properties>

  <distributionManagement>
    <snapshotRepository>
      <id>zt-snapshots</id>
      <name>ZeroTurnaround Snapshots</name>
      <url>https://nexus.0t.ee/repository/zt-snapshots</url>
      <layout>default</layout>
    </snapshotRepository>
  </distributionManagement>

  <repositories>
    <repository>
      <id>zt-releases</id>
      <url>https://nexus.0t.ee/repository/zt-releases/</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>zt-public-releases</id>
      <url>https://nexus.0t.ee/repository/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.8.2</version>
            <configuration>
              <altDeploymentRepository>zt-releases::default::https://nexus.0t.ee/repository/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>
