<?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.tooling</groupId>
        <artifactId>mule-runtime-tooling-client-parent</artifactId>
        <version>4.8.0-rc3</version>
    </parent>

    <artifactId>mule-runtime-tooling-client</artifactId>
    <name>Mule Runtime Tooling Client :: Client</name>
    <description>Client for Mule Runtime Tooling</description>

    <properties>
        <formatterConfigPath>../formatter.xml</formatterConfigPath>
        <commons-compress.version>1.22</commons-compress.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.mule.tooling</groupId>
            <artifactId>mule-tooling-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.runtime.introspection</groupId>
            <artifactId>introspector</artifactId>
        </dependency>

        <!-- License -->
        <dependency>
            <groupId>com.mulesoft.licm</groupId>
            <artifactId>licm-studio</artifactId>
        </dependency>

        <!-- Logger -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-1.2-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.lmax</groupId>
            <artifactId>disruptor</artifactId>
        </dependency>
        <!-- End of Logger -->

        <!-- Internal Dependencies -->
        <dependency>
            <groupId>org.mule.tooling</groupId>
            <artifactId>mule-agent-rest-client</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <!-- conflict with the one that comes from mule-spring-module -->
                <exclusion>
                    <groupId>org.javassist</groupId>
                    <artifactId>javassist</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-datasense-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-datasense</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-apikit-metadata-api</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mule.services</groupId>
            <artifactId>mule-service-apikit-metadata</artifactId>
            <classifier>mule-service</classifier>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-dwb-api</artifactId>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.services</groupId>
            <artifactId>mule-service-weave-ee</artifactId>
            <classifier>mule-service</classifier>
        </dependency>

        <dependency>
            <groupId>org.mule.distributions</groupId>
            <artifactId>mule-runtime-impl-bom</artifactId>
            <type>pom</type>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j-slf4j2-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.mule.distributions</groupId>
            <artifactId>api-gateway-bom-api</artifactId>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.mule.distributions</groupId>
            <artifactId>mule-runtime-impl-bom</artifactId>
            <type>pom</type>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j-slf4j2-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${commons.lang.version}</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>org.mule.tooling</groupId>
            <artifactId>mule-runtime-tooling-tests-utils</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.json</groupId>
                    <artifactId>json</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-maven-client-api</artifactId>
            <version>${muleMavenClient}</version>
        </dependency>
        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-maven-client-impl</artifactId>
            <version>${muleMavenClient}</version>
            <exclusions>
                <exclusion>
                    <groupId>commons-io</groupId>
                    <artifactId>commons-io</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-api</artifactId>
            <version>${muleApiTestVersion}</version>
            <type>test-jar</type>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j-slf4j2-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-module-spring-config</artifactId>
            <version>${mule.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.logging.log4j</groupId>
                    <artifactId>log4j-slf4j2-impl</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-junit4</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.skyscreamer</groupId>
            <artifactId>jsonassert</artifactId>
            <version>${jsonassert.version}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-compress</artifactId>
            <version>${commons-compress.version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>testJdkWithoutXmlModule</id>
            <activation>
                <!-- This profile cannot be activated based on the jdk because the jdk on which this has to be activated or not -->
                <!-- is the one used to run the tests, not the one used to run Maven. -->
                <property>
                    <name>!testJdkWithXmlModule</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>3.5.0</version>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>properties</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>--add-opens java.base/java.io=ALL-UNNAMED --add-opens java.desktop/java.beans=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.xml/javax.xml.namespace=ALL-UNNAMED --add-exports java.base/sun.net.www.protocol.jar=ALL-UNNAMED</argLine>
                            <additionalClasspathElements>
                                <!-- Add this to the classpath so it is available when running tests with jvm8 -->
                                <!-- but it does not interfere with the module system -->
                                <!-- (it has colliding packages with java.xml module) when running with java11+ -->
                                <additionalClasspathElement>${org.mule.apache:xerces2-xsd11:jar:}</additionalClasspathElement>
                            </additionalClasspathElements>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
            <dependencies>
                <dependency>
                    <groupId>xml-apis</groupId>
                    <artifactId>xml-apis</artifactId>
                    <!-- This is needed only for jdk8, the required classes from here -->
                    <!-- are already available in the jdk on versions 11+ -->
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
	</profiles>
</project>
