<?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/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>

   <groupId>org.alfresco</groupId>
   <artifactId>jakarta-dependencies</artifactId>
   <version>2</version>
   <packaging>pom</packaging>

   <properties>
      <rules.path>${maven.multiModuleProjectDirectory}/transform-rules</rules.path>
   </properties>

   <scm>
      <connection>scm:git:https://github.com/Alfresco/jakarta-dependencies.git</connection>
      <developerConnection>scm:git:https://github.com/Alfresco/jakarta-dependencies.git</developerConnection>
      <url>https://github.com/Alfresco/jakarta-dependencies</url>
      <tag>jakarta-dependencies-2</tag>
   </scm>

   <distributionManagement>
      <repository>
         <id>alfresco-internal</id>
         <url>https://artifacts.alfresco.com/nexus/content/repositories/releases</url>
      </repository>
      <snapshotRepository>
         <id>alfresco-internal-snapshots</id>
         <url>https://artifacts.alfresco.com/nexus/content/repositories/snapshots</url>
      </snapshotRepository>
   </distributionManagement>

   <profiles>
      <profile>
         <id>flattenRelease</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>flatten-maven-plugin</artifactId>
                  <configuration>
                  </configuration>
                  <executions>
                     <execution>
                        <id>flatten</id>
                        <phase>process-resources</phase>
                        <goals>
                           <goal>flatten</goal>
                        </goals>
                     </execution>
                     <execution>
                        <id>flatten.clean</id>
                        <phase>clean</phase>
                        <goals>
                           <goal>clean</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>

   <build>
      <pluginManagement>
         <plugins>
            <plugin>
               <groupId>org.eclipse.transformer</groupId>
               <artifactId>transformer-maven-plugin</artifactId>
               <version>0.5.0</version>
            </plugin>
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-release-plugin</artifactId>
               <version>3.0.1</version>
            </plugin>
            <plugin>
               <groupId>org.codehaus.mojo</groupId>
               <artifactId>flatten-maven-plugin</artifactId>
               <version>1.5.0</version>
            </plugin>
         </plugins>
      </pluginManagement>

      <plugins>
         <plugin>
            <groupId>org.eclipse.transformer</groupId>
            <artifactId>transformer-maven-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
               <rules>
                  <renames>${rules.path}/rename-rules.properties</renames>
                  <versions>${rules.path}/version-rules.properties</versions>
                  <directs>${rules.path}/direct-rules.properties</directs>
               </rules>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-release-plugin</artifactId>
            <configuration>
               <releaseProfiles>flattenRelease</releaseProfiles>
            </configuration>
         </plugin>
      </plugins>
   </build>

   <modules>
      <module>apache-chemistry</module>
      <module>freemarker</module>
   </modules>
</project>