<?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">
    <parent>
        <groupId>com.mulesoft.mule.distributions</groupId>
        <artifactId>mule-ee-bom</artifactId>
        <version>4.7.4</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>mule-runtime-impl-no-services-bom</artifactId>
    <packaging>pom</packaging>
    <name>Mule Runtime EE Implementation Libraries Without Services BOM</name>
    <description>A BOM project that provides all the implementation libraries required by the Mule runtime EE, excluding services</description>

    <properties>
        <formatterConfigPath>../../formatter.xml</formatterConfigPath>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.mulesoft.mule.runtime</groupId>
            <artifactId>mule-core-ee</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.mule.runtime.modules</groupId>
            <artifactId>mule-modules-all</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>com.mulesoft.mule.distributions</groupId>
            <artifactId>api-gateway-bom-impl</artifactId>
            <type>pom</type>
            <exclusions>
                <exclusion>
                    <groupId>com.mulesoft.anypoint</groupId>
                    <artifactId>api-gateway-contract-service</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.mulesoft.anypoint</groupId>
                    <artifactId>api-gateway-events-collector-service</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-dwb-api</artifactId>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.mule.distributions</groupId>
            <artifactId>patches</artifactId>
            <version>${project.version}</version>
            <type>pom</type>
        </dependency>
        <dependency>
            <groupId>org.mule.distributions</groupId>
            <artifactId>mule-wrapper-additional-parameters-parser</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release-dry-run</id>
            <properties>
                <skipNoSnapshotsEnforcerPluginRule>false</skipNoSnapshotsEnforcerPluginRule>
            </properties>
            <build>
                <plugins>
                    <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>
                                            <excludes>
                                                <exclude>org.mule.weave:dwb-api</exclude>
                                                <exclude>org.mule.runtime:mule-dwb-api</exclude>
                                            </excludes>
                                        </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-clean-plugin,
                                                org.apache.maven.plugins:maven-help-plugin
                                            </unCheckedPluginList>
                                        </requirePluginVersions>
                                    </rules>
                                    <skip>${skipNoSnapshotsEnforcerPluginRule}</skip>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
