<?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>com.mulesoft.runtime.ang</groupId>
    <artifactId>mule-ang-introspection-service-parent</artifactId>
    <version>1.0.0</version>
    <packaging>pom</packaging>

    <name>Mule ANG Introspection Service Parent pom</name>
    <url>https://github.com/mulesoft/mule-artifact-ast</url>
    <organization>
        <name>MuleSoft, Inc.</name>
        <url>http://www.mulesoft.com</url>
    </organization>
    <licenses>
        <license>
            <name>MSA</name>
            <url>https://www.mulesoft.com/</url>
        </license>
    </licenses>
    <mailingLists>
        <mailingList>
            <name>developers</name>
            <post>mule-esb@mulesoft.com</post>
        </mailingList>
    </mailingLists>

    <developers>
        <developer>
            <id>facunlk</id>
            <name>Facundo Lopez Kauffman</name>
            <email>facundo.lopez@mulesoft.com</email>
            <roles>
                <role>Project Manager</role>
            </roles>
        </developer>
        <developer>
            <id>elrodro83</id>
            <name>Rodrigo Merino</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/EE</url>
    </issueManagement>

    <scm>
        <connection>scm:git:git://https://github.com/mulesoft/mule-ang-introspection-service.git</connection>
        <developerConnection>scm:git:git@github.com:mulesoft/mule-ang-introspection-service.git</developerConnection>
        <url>https://github.com/mulesoft/mule-ang-introspection-service</url>
    </scm>

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

        <muleArtifactAstVersion>1.1.0-20220125</muleArtifactAstVersion>
        <muleVersion>4.5.0-20220125</muleVersion>
        <muleLoggingVersion>4.5.0-20220221</muleLoggingVersion>
        <apiGwVersion>1.5.0-20211019</apiGwVersion>
        <apiGwModulesVersion>4.5.0-20211019</apiGwModulesVersion>

        <amfVersion>2.12</amfVersion>
        <amfClientVersion>4.7.8</amfClientVersion>
        <amfXmlExtensionVersion>2.0.2</amfXmlExtensionVersion>
        <angContainersVersion>1.1.128</angContainersVersion>
        <snakeYamlVersion>1.30</snakeYamlVersion>

        <junitVersion>4.13.2</junitVersion>
        <hamcrestVersion>2.2</hamcrestVersion>
        <mockitoVersion>4.4.0</mockitoVersion>
        <aspectjVersion>1.9.9</aspectjVersion>

        <mule.maven.plugin.version>3.6.0</mule.maven.plugin.version>

        <mulesoftLicenseVersion>1.0.3</mulesoftLicenseVersion>
        <licensePath>LICENSE_HEADER_80.txt</licensePath>
        <licenseYear>2021</licenseYear>

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

        <license.maven.plugin.version>4.1</license.maven.plugin.version>
        <allureReportVersion>2.8.1</allureReportVersion>
        <allureJunitVersion>2.17.3</allureJunitVersion>
        <allure.maven.plugin.version>2.11.2</allure.maven.plugin.version>
        <jacoco.version>0.8.7</jacoco.version>

        <maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
        <maven.surefire.plugin.version>2.22.2</maven.surefire.plugin.version>
        <maven.enforcer.plugin.version>3.0.0</maven.enforcer.plugin.version>
        <build.helper.maven.plugin.version>3.3.0</build.helper.maven.plugin.version>

        <maven.dependency.plugin.version>2.8</maven.dependency.plugin.version>
        <maven.site.plugin.version>3.11.0</maven.site.plugin.version>
    </properties>

    <modules>
        <module>allure</module>
        <module>schedulers-dialect</module>
        <module>sample-apps</module>
        <module>classpath</module>
        <module>introspector</module>
        <module>benchmark</module>
    </modules>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven.compiler.plugin.version}</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>
                    <dependencies>
                        <!-- This dependency provides the license header required for the source files of this project.
                             An external artifact is used to simplify the configuration of the build as without it,
                             a cumbersome structure of relative paths per project should have been used. See EE-4843
                             for more info -->
                        <dependency>
                            <groupId>com.mulesoft.license</groupId>
                            <artifactId>license</artifactId>
                            <version>${mulesoftLicenseVersion}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <skip>${skipVerifications}</skip>
                        <header>${licensePath}</header>
                        <properties>
                            <year>${licenseYear}</year>
                        </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.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.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven.dependency.plugin.version}</version>
                </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.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>io.qameta.allure</groupId>
                <artifactId>allure-maven</artifactId>
            </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>
                            <goal>test-jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.github.amlorg</groupId>
                <artifactId>amf-client_${amfVersion}</artifactId>
                <version>${amfClientVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.amf</groupId>
                <artifactId>amf-xml-extension_${amfVersion}</artifactId>
                <version>${amfXmlExtensionVersion}</version>
            </dependency>
            <dependency>
                <groupId>com.mulesoft.ang.containers</groupId>
                <artifactId>ang-containers</artifactId>
                <version>${angContainersVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>${snakeYamlVersion}</version>
            </dependency>

            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-artifact-ast-xml-parser</artifactId>
                <version>${muleArtifactAstVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-artifact-ast-serialization</artifactId>
                <version>${muleArtifactAstVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-javaee</artifactId>
                <version>${muleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-container</artifactId>
                <version>${muleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-deployment-model-impl</artifactId>
                <version>${muleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-tls</artifactId>
                <version>${muleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-extensions-xml-support</artifactId>
                <version>${muleVersion}</version>
            </dependency>
            <dependency>
                <groupId>com.mulesoft.mule.runtime.modules</groupId>
                <artifactId>mule-runtime-ee-extension-model</artifactId>
                <version>${muleVersion}</version>
            </dependency>
            <dependency>
                <groupId>org.mule.runtime</groupId>
                <artifactId>mule-module-logging</artifactId>
                <version>${muleLoggingVersion}</version>
            </dependency>
            <dependency>
                <!-- TODO EE-8037 remove this dependency -->
                <groupId>com.mulesoft.mule.runtime</groupId>
                <artifactId>mule-core-ee</artifactId>
                <version>${muleVersion}</version>
            </dependency>
            <dependency>
                <groupId>com.mulesoft.anypoint</groupId>
                <artifactId>api-gateway-api</artifactId>
                <version>${apiGwVersion}</version>
            </dependency>
            <dependency>
                <groupId>com.mulesoft.anypoint</groupId>
                <artifactId>mule-module-autodiscovery</artifactId>
                <version>${apiGwModulesVersion}</version>
            </dependency>

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

    <distributionManagement>
        <repository>
            <id>mule-ee-releases</id>
            <name>Mule Release Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-releases</url>
        </repository>
        <snapshotRepository>
            <id>mule-ee-snapshots</id>
            <name>Mule Snapshot Repository</name>
            <url>https://repository-master.mulesoft.org/nexus/content/repositories/ci-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>3.0.1</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.mule.tools.maven:exchange-mule-maven-plugin,
                                                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>
