<?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>
        <artifactId>mule-maven-client</artifactId>
        <groupId>org.mule</groupId>
        <version>2.5.5</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>mule-maven-client-impl</artifactId>
    <name>Mule Maven Client Implementation</name>

    <properties>
        <apiVersion>${project.version}</apiVersion>
        <surefire.args>
            ${surefire.args.base}
            -XX:+IgnoreUnrecognizedVMOptions
            <!-- So that PlexusTestCase container can access MavenMuleRepositorySystemManager -->
            --add-opens=org.mule.runtime.maven.client.impl/org.mule.maven.client.internal.repository=ALL-UNNAMED
        </surefire.args>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-maven-client-api</artifactId>
            <version>${apiVersion}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-model</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>mule-maven-pom-parser-impl</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-model</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>com.vdurmont</groupId>
            <artifactId>semver4j</artifactId>
        </dependency>

        <dependency>
            <groupId>org.mule</groupId>
            <artifactId>maven-model-shaded</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-settings-builder</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>javax.inject</groupId>
                    <artifactId>javax.inject</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- force compile scope so this is present when running on maven 3.9.9+ -->
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-sec-dispatcher</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.resolver</groupId>
            <artifactId>maven-resolver-supplier</artifactId>
            <exclusions>
                <!-- These artifacts must be present only in maven-model-shaded -->
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-model</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-model-builder</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-repository-metadata</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.resolver</groupId>
            <artifactId>maven-resolver-transport-wagon</artifactId>
            <exclusions>
                <exclusion>
                    <groupId> org.apache.maven.wagon</groupId>
                    <artifactId>wagon-provider-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.resolver</groupId>
            <artifactId>maven-resolver-transport-file</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.resolver</groupId>
            <artifactId>maven-resolver-transport-http</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.wagon</groupId>
            <artifactId>wagon-http</artifactId>
            <exclusions>
                <exclusion>
                    <!-- Depend on 4.5.12 but we will use latest released version -->
                    <groupId>org.apache.httpcomponents</groupId>
                    <artifactId>httpclient</artifactId>
                </exclusion>
                <exclusion>
                    <!-- Depends on 1.12.1 but we will use latest released version -->
                    <!-- Remove if we ever upgrade to wagon-http:3.5.1+ -->
                    <groupId>org.jsoup</groupId>
                    <artifactId>jsoup</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>commons-logging</groupId>
                    <artifactId>commons-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

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

        <!-- Sisu still doesn't support the jakarta annotations -->
        <!-- https://github.com/eclipse-sisu/sisu-project/issues/92 -->
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
        </dependency>

        <!-- Needed by wagon-http. Remove if we ever upgrade to wagon-http:3.5.1+ -->
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
        </dependency>

        <dependency>
            <groupId>com.beust</groupId>
            <artifactId>jcommander</artifactId>
        </dependency>

        <dependency>
            <groupId>org.eclipse.sisu</groupId>
            <artifactId>org.eclipse.sisu.plexus</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>javax.enterprise</groupId>
                    <artifactId>cdi-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-classworlds</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>javax.annotation</groupId>
                    <artifactId>javax.annotation-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest</artifactId>
            <scope>test</scope>
        </dependency>

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

    <build>
        <plugins>
            <plugin>
                <groupId>org.eclipse.sisu</groupId>
                <artifactId>sisu-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>index-project</id>
                        <goals>
                            <goal>main-index</goal>
                            <goal>test-index</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
