<?xml version="1.0" encoding="UTF-8"?>
<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</groupId>
        <artifactId>mule-plugin-mgmt-parent-pom</artifactId>
        <version>4.13.0-SNAPSHOT</version>
        <relativePath/>
    </parent>

    <artifactId>mule-apis</artifactId>
    <version>1.13.0-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>Mule APIs aggregate</name>
    <description>APIs for Mule Runtime</description>
    <url>https://github.com/mulesoft-emu/mule-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>

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

    <properties>
        <muleModuleMavenPluginVersion>1.13.0-SNAPSHOT</muleModuleMavenPluginVersion>        
        <licensePath>LICENSE_HEADER_CPAL.txt</licensePath>
        <licenseYear>2023</licenseYear>

        <oldMuleArtifactVersion>1.11.0</oldMuleArtifactVersion>
        <muleApiAnnotationsVersion>1.12.0-SNAPSHOT</muleApiAnnotationsVersion>
        <muleBomVersion>4.13.0-SNAPSHOT</muleBomVersion>
    </properties>
    
    <modules>
    	<module>mule-api</module>
    	<module>mule-policy-api</module>
    	<module>mule-http-api</module>
    	<module>mule-http-policy-api</module>
    	<module>mule-profiling-api</module>
    	<module>mule-functional-utils</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.mule</groupId>
                <artifactId>mule-runtime-bom</artifactId>
                <version>${muleBomVersion}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>org.mule</groupId>
                <artifactId>mule-tests-bom</artifactId>
                <version>${muleBomVersion}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <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>
                    <configuration>
                        <archive>
                            <!-- Custom Entries -->
                            <manifestEntries>
                                <Git-tags>${git.tags}</Git-tags>
                                <Git-branch>${git.branch}</Git-branch>
                                <Git-remote-origin-url>${git.remote.origin.url}</Git-remote-origin-url>
                                <Git-commit-id>${git.commit.id}</Git-commit-id>
                                <Git-commit-id-describe>${git.commit.id.describe}</Git-commit-id-describe>
                                <Git-commit-time>${git.commit.time}</Git-commit-time>
                                <Multi-Release>true</Multi-Release>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.mule.tools.maven</groupId>
                    <artifactId>mule-module-maven-plugin</artifactId>
                    <version>${muleModuleMavenPluginVersion}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>generate</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>analyze</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>analyze</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <configuration>
                        <!-- Exclude alternate versions for multi-release modules-->
                        <excludes>
                            <exclude>META-INF/**/*</exclude>
                        </excludes>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.mule.tools.maven</groupId>
                <artifactId>mule-module-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.revapi</groupId>
                <artifactId>revapi-maven-plugin</artifactId>
                <configuration>
                    <skip>${skipRevapiCheck}</skip>
                    <oldVersion>${oldMuleArtifactVersion}</oldVersion>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
            </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>
                <skipNoSnapshotsEnforcerPluginRule>false</skipNoSnapshotsEnforcerPluginRule>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-enforcer-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
