<?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.0.0-rc.darkseid</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>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <excludeTypes>zip,pom</excludeTypes>
                            <includeScope>runtime</includeScope>
                            <overWriteIfNewer>false</overWriteIfNewer>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <outputDirectory>${project.build.directory}/dependencies</outputDirectory>
                            <!-- These libraries are shaded with spring-config and have issues when running this build inside uber reactor -->
                            <!-- Remote this once https://www.mulesoft.org/jira/browse/MULE-10255 is fixed -->
                            <excludeArtifactIds>cglib,asm</excludeArtifactIds>
                            <excludeClassifiers>mule-service</excludeClassifiers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <skip>${skipVerifications}</skip>
                    <descriptors>
                        <descriptor>src/main/assembly/zip.xml</descriptor>
                    </descriptors>
                    <appendAssemblyId>false</appendAssemblyId>
                    <attach>false</attach>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.mule.tools</groupId>
                <artifactId>mule-assembly-verifier</artifactId>
                <configuration>
                    <skip>${skipVerifications}</skip>
                    <whitelist>src/main/assembly/assembly-whitelist.txt</whitelist>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>2.4.8</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.mule.tooling</groupId>
            <artifactId>mule-runtime-tooling-api</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.mule.tooling</groupId>
            <artifactId>mule-agent-rest-client</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-datasense</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.ws.xmlschema</groupId>
                    <artifactId>xmlschema-core</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.google.code.gson</groupId>
                    <artifactId>gson</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>log4j</groupId>
                    <artifactId>log4j</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>jsr305</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-lang</groupId>
                    <artifactId>commons-lang</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

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

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

        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mule.distributions</groupId>
            <artifactId>mule-runtime-impl-bom</artifactId>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>com.mulesoft.mule.distributions</groupId>
            <artifactId>mule-runtime-impl-bom</artifactId>
            <type>pom</type>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-maven-client-impl</artifactId>
        </dependency>

        <!-- XML dependencies from need to be declared explicitly -->
        <dependency>
            <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
        </dependency>

        <!-- Declare as provided Tooling API dependencies -->
        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-api</artifactId>
            <scope>provided</scope>
        </dependency>

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

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-metadata-model-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-metadata-model-java</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-metadata-model-json</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-metadata-model-persistence</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-metadata-model-xml</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-metadata-model-raml</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-metadata-model-catalog</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-message-metadata-model</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-extensions-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-extensions-api-dsql</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-extensions-api-persistence</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-maven-client-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.tooling</groupId>
            <artifactId>mule-runtime-event-model</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-model-builder</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.mule.runtime</groupId>
            <artifactId>mule-embedded-api</artifactId>
            <version>${mule.embedded.api}</version>
        </dependency>

        <!-- Test -->
        <dependency>
            <groupId>org.mule.tooling</groupId>
            <artifactId>mule-runtime-tooling-tests-utils</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </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>
    </dependencies>
</project>
