<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright The WildFly Authors
  ~ SPDX-License-Identifier: Apache-2.0
  -->

<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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.wildfly.core</groupId>
        <artifactId>wildfly-core-parent</artifactId>
        <version>32.0.0.Beta6</version>
    </parent>

    <artifactId>wildfly-embedded</artifactId>
    <name>WildFly: Embedded</name>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.wildfly.core</groupId>
                <artifactId>wildfly-core-testbom</artifactId>
                <version>${project.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <!--
             All dependencies must be strictly controlled so it is clear what is needed
             by the embedding app. This means for nearly all dependencies we exclude all
             transitive deps, forcing them to be explicitly declared.

             Please keep dependencies organized by how they are used.
        -->

        <!-- Compile time dependencies that must be available at runtime
             via the embedding app's classloader -->
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss.modules</groupId>
            <artifactId>jboss-modules</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-controller-client</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Runtime only dependencies that must be on the embedding app's classpath -->
        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jboss-dmr</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- Compile time dependencies that at runtime are loaded
             by the embedded process' modular classloader from its
             module path. These do not need to be visible to the
             embedding app's classloader and are thus treated as 'provided' -->
        <dependency>
            <groupId>org.jboss.msc</groupId>
            <artifactId>jboss-msc</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
            <scope>provided</scope>
        </dependency>

        <!-- Compile time only dependencies not needed at runtime -->
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-annotations</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>*</groupId>
                    <artifactId>*</artifactId>
                </exclusion>
            </exclusions>
            <!-- This is a compile-time dependency of this project, but is not needed at compile or runtime by other
                  projects that depend on this project.-->
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-processor</artifactId>
            <exclusions>
                <!-- Here we don't blanket exclude because we need jdeparser and it's not part
                     of the wildfy-core bom, i.e. we need it via a transitive dep -->
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging-annotations</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.jboss.logging</groupId>
                    <artifactId>jboss-logging</artifactId>
                </exclusion>
            </exclusions>
            <!-- This is a compile-time dependency of this project, but is not needed at compile or runtime by other
                  projects that depend on this project.-->
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <!-- Here we don't blanket exclude because we need are ok with transitive test deps -->
            <scope>test</scope>
        </dependency>

    </dependencies>
</project>
