<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.mule.extensions</groupId>
        <artifactId>mule-modules-parent</artifactId>
        <version>1.2.0</version>
    </parent>
    <groupId>com.mulesoft.connectors</groupId>
    <artifactId>mule4-connectors-parent</artifactId>
    <version>2.0.7</version>
    <packaging>pom</packaging>
    <name>Mule Connectivity Parent POM</name>

    <properties>
        <jdk.version>1.8</jdk.version>

        <mule.sdk.api.version>1.0.0</mule.sdk.api.version>
        <mule.connector.commons.version>2.1.2</mule.connector.commons.version>

        <configuration.files.vault.secret.engine>connector-credentials</configuration.files.vault.secret.engine>
        <configuration.files.s3.folder>${project.artifactId}</configuration.files.s3.folder>

        <jacoco.version>0.8.14</jacoco.version>
        <munit.extensions.maven.plugin.version>1.7.1-rc1</munit.extensions.maven.plugin.version>
        <munit.version>3.7.1-rc1</munit.version>
        <mtf.tools.version>1.3.0-rc3</mtf.tools.version>
        <munit.input.directory>src/test/munit</munit.input.directory>
        <munit.output.directory>${basedir}/target/test-mule/munit</munit.output.directory>

        <maven.enforcer.plugin.version>3.6.2</maven.enforcer.plugin.version>
        <maven.restrict.versions.plugin.version>3.0.0</maven.restrict.versions.plugin.version>
        <maven.resources.plugin.version>3.5.0</maven.resources.plugin.version>
        <maven.failsafe.plugin.version>3.5.5</maven.failsafe.plugin.version>
        <maven.dependency.plugin.version>3.10.0</maven.dependency.plugin.version>
        <maven.jdeps.plugin.version>3.1.2</maven.jdeps.plugin.version>

        <javaFormatter.plugin.version>2.14.0</javaFormatter.plugin.version>
        <formatterConfigPath>formatter.xml</formatterConfigPath>
        <formatterGoal>validate</formatterGoal>

        <importGoal>check</importGoal>
        <maven.checkstyle.plugin.version>3.6.0</maven.checkstyle.plugin.version>
        <maven.impsort.plugin.version>1.6.2</maven.impsort.plugin.version>

        <skipVerifications>false</skipVerifications>
        <exportedPackagesValidator.strictValidation>true</exportedPackagesValidator.strictValidation>

        <!--        Sarting with mule 4.5 -->
        <!--        <muleBomVersion>4.5.1-SNAPSHOT</muleBomVersion>-->

        <mulesoftLicenseVersion>1.4.0</mulesoftLicenseVersion>
        <license.mojo.maven.plugin.version>2.7.1</license.mojo.maven.plugin.version>
        <licenseYear>2025</licenseYear>
        <licensePluginGoal>check</licensePluginGoal>

        <directory>${project.basedir}/target</directory>
        <aspectj.version>1.9.25.1</aspectj.version>

        <!-- JDeps config-->
        <maven.jdeps.plugin.failOnWarning>true</maven.jdeps.plugin.failOnWarning>
        <maven.jdeps.plugin.multiRelease>17</maven.jdeps.plugin.multiRelease>

        <surefire.jvm>${env.JAVA_HOME}/bin/java</surefire.jvm>
    </properties>

    <dependencyManagement>
        <dependencies>
            <!-- Commons dependency that could be used in all the connectors that extend this pom. -->
            <dependency>
                <groupId>com.mulesoft.connectors</groupId>
                <artifactId>mule-connector-commons</artifactId>
                <version>${mule.connector.commons.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.mule.runtime</groupId>
                        <artifactId>mule-api</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>org.mule.runtime</groupId>
                        <artifactId>mule-extensions-api</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.mule.sdk</groupId>
            <artifactId>mule-sdk-api</artifactId>
            <version>${mule.sdk.api.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
<!--
This Maven plugin is configured to copy MUnit-specific resources during the 'process-test-resources' phase.  The 'copy-resources' task copies files from the MUnit input directory (${munit.input.directory}) to the  output directory (${munit.output.directory}), applying resource filtering when needed.

Filtering allows for the replacement of variables defined in the project (such as Maven properties or environment-specific values)  within resource files. This is useful for adapting configuration or property files for different environments or execution scenarios.
-->
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven.resources.plugin.version}</version>
                <executions>
                    <execution>
                        <id>copy-munit-resources</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${munit.output.directory}</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>${munit.input.directory}</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <jvm>${surefire.jvm}</jvm>
                    <argLine>-Dfile.encoding=UTF-8
                        -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar
                        -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile='${session.executionRootDirectory}/target/jacoco.exec'
                    </argLine>
                    <systemPropertyVariables>
                        <!-- Just propagate this variable due to surefire will not do this when forked vm for tests -->
                        <mule.freePortFinder.lockPath>${java.io.tmpdir}/mule/freePortFinder
                        </mule.freePortFinder.lockPath>
                        <maven.projectVersion>${project.version}</maven.projectVersion>
                    </systemPropertyVariables>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.jacoco</groupId>
                        <artifactId>org.jacoco.agent</artifactId>
                        <version>${jacoco.version}</version>
                        <classifier>runtime</classifier>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>com.mulesoft.munit</groupId>
                <artifactId>munit-extensions-maven-plugin</artifactId>
                <version>${munit.extensions.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>test</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skipAfterFailure>true</skipAfterFailure>
                    <argLines>
                        <argLine>
                            -javaagent:${settings.localRepository}/org/jacoco/org.jacoco.agent/${jacoco.version}/org.jacoco.agent-${jacoco.version}-runtime.jar=destfile=${session.executionRootDirectory}/target/jacoco-munit.exec
                        </argLine>
                        <argLine>-Daether.syncContext.named.factory=noop</argLine>
                    </argLines>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.mulesoft.munit</groupId>
                        <artifactId>munit-runner</artifactId>
                        <version>${munit.version}</version>
                        <classifier>mule-plugin</classifier>
                    </dependency>
                    <dependency>
                        <groupId>com.mulesoft.munit</groupId>
                        <artifactId>munit-tools</artifactId>
                        <version>${munit.version}</version>
                        <classifier>mule-plugin</classifier>
                    </dependency>
                    <dependency>
                        <groupId>com.mulesoft.munit</groupId>
                        <artifactId>mtf-tools</artifactId>
                        <version>${mtf.tools.version}</version>
                        <classifier>mule-plugin</classifier>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco.version}</version>
                <configuration>
                    <destFile>${session.executionRootDirectory}/target/jacoco-java.exec</destFile>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>merge</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>merge</goal>
                        </goals>
                        <configuration>
                            <destFile>${session.executionRootDirectory}/target/jacoco.exec</destFile>
                            <fileSets>
                                <fileSet>
                                    <directory>${project.build.directory}</directory>
                                    <includes>
                                        <include>*.exec</include>
                                    </includes>
                                </fileSet>
                            </fileSets>
                        </configuration>
                    </execution>
                    <execution>
                        <id>report</id>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- ## Plugin included to add Integration Tests (IT) to the build lifecycle.
            The Failsafe Plugin is used during the `integration-test` and `verify` phases of the build
            lifecycle to execute the integration tests of an application. The Failsafe Plugin will not
            fail the build during the integration-test phase, thus enabling the post-integration-test
            phase to execute.
            -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven.failsafe.plugin.version}</version>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Plugin added to make sure that all dependencies that are declared are used. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>${maven.dependency.plugin.version}</version>
                <executions>
                    <execution>
                        <id>connector-analyze</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>analyze-only</goal>
                        </goals>
                        <configuration>
                            <ignoredDependencies>
                                <ignoredDependency>org.mule.*</ignoredDependency>
                                <ignoredDependency>com.sun.mail:jakarta.mail</ignoredDependency>
                            </ignoredDependencies>
                            <failOnWarning>true</failOnWarning>
                            <ignoredUsedUndeclaredDependencies>
                                <ignoredUsedUndeclaredDependency>*</ignoredUsedUndeclaredDependency>
                            </ignoredUsedUndeclaredDependencies>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Plugin added to enforce the compliance with several rules. -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven.enforcer.plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>de.skuzzle.enforcer</groupId>
                        <artifactId>restrict-imports-enforcer-rule</artifactId>
                        <version>${maven.restrict.versions.plugin.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>default-enforced-rules</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <banDistributionManagement/>
                                <requireNoRepositories>
                                    <allowedRepositories>
                                        <!-- This is a repository provided by this pom's parent. -->
                                        <allowedRepository>mule</allowedRepository>
                                        <allowedRepository>mule-releases</allowedRepository>
                                    </allowedRepositories>
                                    <allowedPluginRepositories>
                                        <!-- These are repositories provided by this pom's parent. -->
                                        <allowedPluginRepository>mulesoft-plugin-releases</allowedPluginRepository>
                                        <allowedPluginRepository>mulesoft-plugin-snapshots</allowedPluginRepository>
                                    </allowedPluginRepositories>
                                </requireNoRepositories>
                                <RestrictImports>
                                    <reason>Use java.time (JSR-310) instead of legacy Date API</reason>
                                    <bannedImports>
                                        <bannedImport>java.util.Date</bannedImport>
                                        <bannedImport>java.util.Calendar</bannedImport>
                                    </bannedImports>
                                </RestrictImports>
                                <RestrictImports>
                                    <reason>Runtime Core Utils Deprecation</reason>
                                    <bannedImports>
                                        <bannedImport>org.mule.runtime.core.api.util.*</bannedImport>
                                    </bannedImports>
                                </RestrictImports>
                                <RestrictImports>
                                    <reason>Soap Service Deprecation</reason>
                                    <bannedImports>
                                        <bannedImport>org.mule.runtime.extension.api.soap.*</bannedImport>
                                    </bannedImports>
                                </RestrictImports>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
                <version>${javaFormatter.plugin.version}</version>
                <configuration>
                    <compilerCompliance>${jdk.version}</compilerCompliance>
                    <compilerSource>${jdk.version}</compilerSource>
                    <compilerTargetPlatform>${jdk.version}</compilerTargetPlatform>
                    <configFile>${basedir}/${formatterConfigPath}</configFile>
                    <configJsFile>${basedir}/${formatterConfigPath}</configJsFile>
                    <aggregator>false</aggregator>
                    <executionRoot>true</executionRoot>
                </configuration>
                <executions>
                    <execution>
                        <id>apply-format</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>${formatterGoal}</goal>
                        </goals>
                        <configuration>
                            <skipFormatting>${skipVerifications}</skipFormatting>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.revelc.code</groupId>
                <artifactId>impsort-maven-plugin</artifactId>
                <version>${maven.impsort.plugin.version}</version>
                <configuration>
                    <groups>org.mule.,com.mulesoft.,java.,javax.</groups>
                    <staticGroups>org.mule.,com.mulesoft.,java.,javax.</staticGroups>
                </configuration>
                <executions>
                    <execution>
                        <id>validate-imports</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>${importGoal}</goal>
                        </goals>
                        <configuration>
                            <skip>${skipVerifications}</skip>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <!-- Needed because of maven 3.9.0 backward compatibility issue,
                         See : https://github.com/eclipse/leshan/issues/1410 -->
                    <dependency>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-utils</artifactId>
                        <version>3.5.1</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.plugin.version}</version>
                <executions>
                    <execution>
                        <id>verify-style</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <skip>${skipVerifications}</skip>
                    <logViolationsToConsole>true</logViolationsToConsole>
                    <checkstyleRules>
                        <module name="Checker">
                            <module name="TreeWalker">
                                <module name="AvoidStarImport"/>
                                <module name="UnusedImports"/>
                            </module>
                        </module>
                    </checkstyleRules>
                </configuration>
            </plugin>

            <!-- Added since Java 17 - FY24. MultiRelease is configured via profile for Java 9+ -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jdeps-plugin</artifactId>
                <version>${maven.jdeps.plugin.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>jdkinternals</goal> <!-- verify main classes -->
                            <goal>test-jdkinternals</goal> <!-- verify test classes -->
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <verbose/>
                    <failOnWarning>${maven.jdeps.plugin.failOnWarning}</failOnWarning>
                </configuration>
            </plugin>

            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <!-- inherits full setup from parent -->
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>${license.mojo.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>download-licenses</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>download-licenses</goal>
                        </goals>
                        <configuration>
                            <licensesOutputDirectory>${project.build.directory}/licenses</licensesOutputDirectory>
                            <includeTransitiveDependencies>true</includeTransitiveDependencies>
                            <includedScopes>compile</includedScopes>
                            <excludedScopes>test,provided,runtime,system</excludedScopes>
                            <includeOptional>false</includeOptional>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>

    <scm>
        <connection>scm:git:git@github.com:mulesoft/${project.artifactId}.git</connection>
        <developerConnection>scm:git:git@github.com:mulesoft/${project.artifactId}.git</developerConnection>
        <url>https://github.com/mulesoft/${project.artifactId}</url>
    </scm>

    <profiles>
        <!--
            Profile for Java 9+ to enable multi-release JAR support in jdeps.
            The multi-release option was introduced in Java 9 and is not available in Java 8.
            This profile automatically activates when building with JDK 9 or higher.
        -->
        <profile>
            <id>jdk9-plus-jdeps-multirelease</id>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jdeps-plugin</artifactId>
                        <configuration>
                            <multiRelease>${maven.jdeps.plugin.multiRelease}</multiRelease>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>jdk17-build-with-target-java8</id>
            <activation>
                <jdk>[17,)</jdk>
            </activation>
            <properties>
                <!-- Override the versions from the parent for using a more recent packager and annotations processor -->
                <java.release.version>8</java.release.version>
                <!-- TODO - Change these versions to 4.6.x and 1.6.x respectively when 2026 July release is available -->
                <mule.extensions.support.version>4.9.17</mule.extensions.support.version>
                <mule.extensions.maven.plugin.version>1.9.15</mule.extensions.maven.plugin.version>
                <mule.extensions.ast.loader.version>1.8.19</mule.extensions.ast.loader.version>
                <mule.extensions.api.version>1.9.17</mule.extensions.api.version>
                <mule.api.version>1.9.17</mule.api.version>
                <mule.metadata.version>1.9.19</mule.metadata.version>
                <mule.sdk.version>${mule.extensions.api.version}</mule.sdk.version>
                <extensionsAnnotationProcessorCompileProc></extensionsAnnotationProcessorCompileProc>
                <extensionsAnnotationProcessor>
                    org.mule.runtime.ast.extension.api.loader.ASTExtensionResourcesGeneratorAnnotationProcessor
                </extensionsAnnotationProcessor>
                <exportedPackagesValidator.skip>false</exportedPackagesValidator.skip>
                <exportedPackagesValidator.strictValidation>false</exportedPackagesValidator.strictValidation>

                <surefire.jvm>${env.JAVA_8_HOME}/bin/java</surefire.jvm>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>org.mule.runtime</groupId>
                    <artifactId>mule-extensions-api</artifactId>
                    <version>${mule.extensions.api.version}</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.mule.runtime</groupId>
                    <artifactId>mule-api</artifactId>
                    <version>${mule.api.version}</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration combine.self="override">
                            <encoding>ISO-8859-1</encoding>
                            <release>${java.release.version}</release>
                            <proc>${extensionsAnnotationProcessorCompileProc}</proc>
                            <parameters>true</parameters>
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>org.mule.runtime</groupId>
                                    <artifactId>mule-extension-ast-loader</artifactId>
                                    <version>${mule.extensions.ast.loader.version}</version>
                                </path>
                                <path>
                                    <groupId>org.mule.runtime</groupId>
                                    <artifactId>mule-module-extensions-spring-support</artifactId>
                                    <version>${mule.extensions.support.version}</version>
                                </path>
                                <path>
                                    <groupId>org.mule.runtime</groupId>
                                    <artifactId>mule-extensions-api</artifactId>
                                    <version>${mule.extensions.api.version}</version>
                                </path>
                            </annotationProcessorPaths>
                            <annotationProcessors>
                                <annotationProcessors>${extensionsAnnotationProcessor}</annotationProcessors>
                            </annotationProcessors>
                            <compilerArgs>
                                <arg>-parameters</arg>
                                <arg>-Aextension.version=${project.version}</arg>
                                <arg>-Aextension.resources=${project.build.resources[0].directory}</arg>
                                <arg>-AexportedPackagesValidator.skip=${exportedPackagesValidator.skip}</arg>
                                <arg>
                                    -AexportedPackagesValidator.strictValidation=${exportedPackagesValidator.strictValidation}
                                </arg>
                            </compilerArgs>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>org.mule.sdk</groupId>
                                <artifactId>mule-sdk-api</artifactId>
                                <version>${mule.sdk.api.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>org.mule.runtime</groupId>
                                <artifactId>mule-extensions-api</artifactId>
                                <version>${mule.extensions.api.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <!-- Add Target-Java-Release-Version, not set bu the parent configuration but needed by the packager -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <configuration>
                            <archive>
                                <!--
                                    Disabled for http://mule.mulesoft.org/jira/browse/MULE-1153
                                    and http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4408526
                                 -->
                                <index>false</index>
                                <!-- List dependencies in the MANIFEST.MF -->
                                <manifest>
                                    <!-- Note that we do not generate a classpath into the manifest, since doing so
                                 significnatly slows down compilations that use the jar -->
                                    <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                                    <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                </manifest>
                                <manifestEntries>
                                    <Build-Date>${maven.build.timestamp}</Build-Date>
                                    <!-- Custom Entries -->
                                    <Target-Java-Release-Version>${java.release.version}</Target-Java-Release-Version>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </plugin>

                    <!-- Disable this plugin, as annotation processor is configured on the compiler plugin now -->
                    <plugin>
                        <groupId>org.bsc.maven</groupId>
                        <artifactId>maven-processor-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>process</id>
                                <phase>none</phase>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- Profile to enforce that versions deployed to release servers don't have SNAPSHOT. -->
        <profile>
            <id>release-deployer</id>
            <activation>
                <property>
                    <name>deployer.type</name>
                    <value>release</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>${maven.enforcer.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>version-enforced-rules</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireReleaseVersion/>
                                        <requireReleaseDeps/>
                                    </rules>
                                    <fail>true</fail>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
