<?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.mule.runtime</groupId>
    <artifactId>mule-properties-api</artifactId>
    <version>1.0.0-20220919</version>
    
    <name>Mule Properties API</name>
    <description>Module with the API to provide custom property placeholder resolvers for Mule Artifacts</description>
    <url>https://github.com/mulesoft/mule-properties-api</url>
    <organization>
        <name>MuleSoft, Inc.</name>
        <url>http://www.mulesoft.com</url>
    </organization>
    <licenses>
        <license>
            <name>CPAL v1.0</name>
            <url>http://www.mulesoft.com/CPAL</url>
        </license>
    </licenses>
    <mailingLists>
        <mailingList>
            <name>developers</name>
            <post>mule-esb@mulesoft.com</post>
        </mailingList>
    </mailingLists>

    <developers>
        <developer>
            <id>facunlk</id>
            <name>Facundo Lopex Kaufmann</name>
            <email>facundo.lopez@mulesoft.com</email>
            <roles>
                <role>Engineering Manager</role>
            </roles>
        </developer>
        <developer>
            <id>elrodro83</id>
            <name>Rodrigo Merino</name>
        </developer>
        <developer>
            <id>fsgonz</id>
            <name>Fabian Gonzalez</name>
        </developer>
        <developer>
            <id>mbuchwald</id>
            <name>Martin Buchwald</name>
        </developer>
        <developer>
            <id>mlischetti</id>
            <name>Mariano Lischetti</name>
        </developer>
    </developers>
    <contributors>
        <!-- Refer to https://github.com/mulesoft/mule/graphs/contributors -->
    </contributors>
    <issueManagement>
        <system>jira</system>
        <url>http://www.mulesoft.org/jira/browse/MULE</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git://github.com/mulesoft/mule-properties-api.git</connection>
        <developerConnection>scm:git:git@github.com:mulesoft/mule-properties-api.git</developerConnection>
        <url>https://github.com/mulesoft/mule-properties-api</url>
    </scm>

    <properties>
        <javaVersion>1.8</javaVersion>
        <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>

        <muleApiVersion>1.4.0-20220919</muleApiVersion>
        <muleAstVersion>1.0.0-20220919</muleAstVersion>

        <snakeYamlVersion>1.31</snakeYamlVersion>

        <junitVersion>4.12</junitVersion>
        <hamcrestVersion>1.3</hamcrestVersion>
        <guavaVersion>25.1-jre</guavaVersion>
        <aspectjVersion>1.9.2</aspectjVersion>
        <javax.jaxb-api.version>2.3.0</javax.jaxb-api.version>

        <muleModuleMavenPluginVersion>1.3.0-20220919</muleModuleMavenPluginVersion>

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

        <revapi.maven.plugin.version>0.9.5</revapi.maven.plugin.version>
        <muleRevapiExtensionVersion>1.4.0-20220919</muleRevapiExtensionVersion>
        <oldMuleArtifactVersion>1.0.0</oldMuleArtifactVersion>

        <license.maven.plugin.version>2.11</license.maven.plugin.version>
        <allureReportVersion>2.8.1</allureReportVersion>
        <allureJunitVersion>2.8.1</allureJunitVersion>
        <allure.maven.plugin.version>2.9</allure.maven.plugin.version>
        <jacoco.version>0.8.6</jacoco.version>

        <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
        <maven.enforcer.plugin.version>1.4.1</maven.enforcer.plugin.version>
        <build.helper.maven.plugin.version>3.0.0</build.helper.maven.plugin.version>

        <maven.site.plugin.version>3.9.0</maven.site.plugin.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-api</artifactId>
            <version>${muleApiVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-artifact-ast</artifactId>
            <version>${muleAstVersion}</version>
        </dependency>

        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
            <version>${snakeYamlVersion}</version>
        </dependency>
        <dependency>
            <groupId>org.vibur</groupId>
            <artifactId>vibur-object-pool</artifactId>
            <version>23.0</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junitVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>${hamcrestVersion}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-junit4</artifactId>
            <version>${allureJunitVersion}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <encoding>ISO-8859-1</encoding>
                        <source>${javaVersion}</source>
                        <target>${javaVersion}</target>
                        <proc>none</proc>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>net.revelc.code.formatter</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <version>${javaFormatter.plugin.version}</version>
                    <configuration>
                        <compilerCompliance>${javaVersion}</compilerCompliance>
                        <compilerSource>${javaVersion}</compilerSource>
                        <compilerTargetPlatform>${javaVersion}</compilerTargetPlatform>
                        <configFile>${basedir}/${formatterConfigPath}</configFile>
                        <configJsFile>${basedir}/${formatterConfigPath}</configJsFile>
                        <aggregator>false</aggregator>
                        <executionRoot>true</executionRoot>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>${formatterGoal}</goal>
                            </goals>
                            <configuration>
                                <skipFormatting>${skipVerifications}</skipFormatting>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${license.maven.plugin.version}</version>
                    <configuration>
                        <skip>${skipVerifications}</skip>
                        <header>com/mycila/maven/plugin/license/templates/CPAL.txt</header>
                        <properties>
                            <owner>MuleSoft, Inc</owner>
                            <project.url>http://www.mulesoft.com</project.url>
                        </properties>
                        <excludes>
                            <exclude>target/**</exclude>
                            <exclude>**/.gitignore</exclude>
                            <exclude>**/*.txt</exclude>
                            <exclude>**/*.groovy</exclude>
                            <exclude>**/*.sh</exclude>
                            <exclude>**/*.bat</exclude>
                            <exclude>**/*.ftl</exclude>
                            <exclude>**/*.xml</exclude>
                            <exclude>**/*.properties</exclude>
                            <exclude>**/*.sample</exclude>
                            <exclude>**/*.md</exclude>
                            <exclude>**/*.xsl</exclude>
                            <exclude>**/*.html</exclude>
                            <exclude>**/*.css</exclude>
                            <exclude>**/build-number.txt</exclude>
                        </excludes>
                        <includes>
                            <include>**/*.java</include>
                        </includes>
                        <mapping>
                            <java>SLASHSTAR_STYLE</java>
                        </mapping>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>attach-test-jar</id>
                            <goals>
                                <goal>test-jar</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>
                        <additionalparam>${xDocLint}</additionalparam>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.mule.tools.maven</groupId>
                    <artifactId>mule-module-maven-plugin</artifactId>
                    <version>${muleModuleMavenPluginVersion}</version>
                    <executions>
                        <execution>
                            <id>analyze</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>analyze</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${maven.surefire.plugin.version}</version>
                    <configuration>
                        <argLine>-Dfile.encoding=UTF-8 -javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectjVersion}/aspectjweaver-${aspectjVersion}.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>
                        <properties>
                            <property>
                                <name>listener</name>
                                <value>io.qameta.allure.junit4.AllureJunit4</value>
                            </property>
                        </properties>
                        <systemProperties>
                            <property>
                                <name>allure.results.directory</name>
                                <value>${project.build.directory}/allure-results</value>
                            </property>
                        </systemProperties>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.aspectj</groupId>
                            <artifactId>aspectjweaver</artifactId>
                            <version>${aspectjVersion}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.jacoco</groupId>
                            <artifactId>org.jacoco.agent</artifactId>
                            <version>${jacoco.version}</version>
                            <classifier>runtime</classifier>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>io.qameta.allure</groupId>
                    <artifactId>allure-maven</artifactId>
                    <version>${allure.maven.plugin.version}</version>
                    <configuration>
                        <reportVersion>${allureReportVersion}</reportVersion>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven.site.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>net.revelc.code.formatter</groupId>
                <artifactId>formatter-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.mule.tools.maven</groupId>
                <artifactId>mule-module-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>analyze</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>analyze</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>io.qameta.allure</groupId>
                <artifactId>allure-maven</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>${build.helper.maven.plugin.version}</version>
                <executions>
                    <execution>
                        <id>parse-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                        <phase>validate</phase>
                    </execution>
                </executions>
            </plugin>
<!--             <plugin> -->
<!--                 <groupId>org.revapi</groupId> -->
<!--                 <artifactId>revapi-maven-plugin</artifactId> -->
<!--                 <version>${revapi.maven.plugin.version}</version> -->
<!--                 <dependencies> -->
<!--                     <dependency> -->
<!--                         <groupId>org.mule.tools.maven</groupId> -->
<!--                         <artifactId>mule-revapi-extension</artifactId> -->
<!--                         <version>${muleRevapiExtensionVersion}</version> -->
<!--                     </dependency> -->
<!--                 </dependencies> -->
<!--                 <configuration> -->
<!--                     <oldVersion>${oldMuleArtifactVersion}</oldVersion> -->
<!--                     <failOnUnresolvedArtifacts>true</failOnUnresolvedArtifacts> -->
<!--                     <failOnMissingConfigurationFiles>false</failOnMissingConfigurationFiles> -->
<!--                     <analysisConfiguration><![CDATA[ -->
<!--                                 { -->
<!--                                     "revapi" : { -->
<!--                                         "java" : { -->
<!--                                             "missing-classes" : { -->
<!--                                                 "behavior" : "report" -->
<!--                                             } -->
<!--                                         }, -->
<!--                                         "semver": { -->
<!--                                           "ignore": { -->
<!--                                             "enabled": true, -->
<!--                                             "versionIncreaseAllows" : { -->
<!--                                               "major" : "breaking", -->
<!--                                               "minor" : "nonBreaking", -->
<!--                                               "patch" : "equivalent" -->
<!--                                             } -->
<!--                                           } -->
<!--                                         } -->
<!--                                     } -->
<!--                                 } -->
<!--                             ]]></analysisConfiguration> -->
<!--                     <analysisConfigurationFiles combine.children="append"> -->
<!--                         <configurationFile> -->
<!--                             <path>api-changes.json</path> -->
<!--                             <roots> -->
<!--                                 <root> -->
<!--                                     ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion} -->
<!--                                 </root> -->
<!--                             </roots> -->
<!--                         </configurationFile> -->
<!--                     </analysisConfigurationFiles> -->
<!--                 </configuration> -->
<!--                 <executions> -->
<!--                     <execution> -->
<!--                         <id>api-check</id> -->
<!--                         <goals><goal>check</goal></goals> -->
<!--                     </execution> -->
<!--                 </executions> -->
<!--             </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>
        </plugins>
    </build>

    <distributionManagement>
        <repository>
            <id>mule-releases</id>
            <name>Mule Release Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>mule-snapshots</id>
            <name>Mule Snapshot Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/snapshots</url>
            <uniqueVersion>false</uniqueVersion>
        </snapshotRepository>
    </distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <skipGpg>false</skipGpg>
                <skipNoSnapshotsEnforcerPluginRule>false</skipNoSnapshotsEnforcerPluginRule>
            </properties>
            <build>
                <plugins>
                    <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>
                            <additionalparam>${xDocLint}</additionalparam>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <skip>${skipGpg}</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                        <version>${maven.enforcer.plugin.version}</version>
                        <executions>
                            <execution>
                                <id>enforce-no-snapshots-in-deps</id>
                                <goals>
                                    <goal>enforce</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <requireReleaseDeps>
                                            <message>No Snapshots Allowed in Deps!</message>
                                        </requireReleaseDeps>
                                        <requireReleaseVersion>
                                            <message>No Snapshots Allowed in Project Version!</message>
                                        </requireReleaseVersion>
                                        <requirePluginVersions>
                                            <message>Best Practice is to always define plugin versions!</message>
                                            <unCheckedPluginList>
                                                org.apache.maven.plugins:maven-source-plugin,
                                                org.apache.maven.plugins:maven-site-plugin,
                                                org.apache.maven.plugins:maven-javadoc-plugin,
                                                org.apache.maven.plugins:maven-resources-plugin,
                                                org.apache.maven.plugins:maven-surefire-plugin,
                                                org.apache.maven.plugins:maven-jar-plugin,
                                                org.apache.maven.plugins:maven-clean-plugin,
                                                org.apache.maven.plugins:maven-install-plugin,
                                                org.apache.maven.plugins:maven-deploy-plugin
                                            </unCheckedPluginList>
                                        </requirePluginVersions>
                                    </rules>
                                    <skip>${skipNoSnapshotsEnforcerPluginRule}</skip>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
