<?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>27.1.10.Final-redhat-00001</version>
    </parent>

    <artifactId>wildfly-controller</artifactId>

    <name>WildFly: Controller Core</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>

        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jboss-dmr</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-controller-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-core-security</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron-auth</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron-credential</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron-credential-source-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron-password-impl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron-security-manager</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron-permission</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron-sasl</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron-util</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron-x500-cert-acme</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-service</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-version</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.modules</groupId>
            <artifactId>jboss-modules</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.msc</groupId>
            <artifactId>jboss-msc</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss.logmanager</groupId>
            <artifactId>jboss-logmanager</artifactId>
        </dependency>

        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>staxmapper</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.common</groupId>
            <artifactId>wildfly-common</artifactId>
        </dependency>

        <dependency>
            <groupId>org.projectodd.vdx</groupId>
            <artifactId>vdx-wildfly</artifactId>
        </dependency>

        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit</artifactId>
        </dependency>

        <dependency>
            <groupId>org.yaml</groupId>
            <artifactId>snakeyaml</artifactId>
        </dependency>

        <!-- Test Dependencies -->
        <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.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-annotations</artifactId>
            <!-- 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>
            <!-- 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>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <!-- Used in EnvVarAttributeOverrideModelTestCase -->
                                <!-- This corresponds to the /subsystem=custom resource and its my-attr attribute -->
                                <SUBSYSTEM_CUSTOM__MY_ATTR>5678</SUBSYSTEM_CUSTOM__MY_ATTR>
                            </environmentVariables>
                            <excludes>
                                <exclude>org/jboss/as/controller/EnvVarAttributeOverrideModel$EnabledOverridingEnvVarTestCase</exclude>
                            </excludes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>env-var-overrides</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <configuration>
                            <environmentVariables>
                                <!-- Used in EnvVarAttributeOverrideModelTestCase -->
                                <!-- The presence of this env var is required to trigger the overridding feature -->
                                <WILDFLY_OVERRIDING_ENV_VARS>1</WILDFLY_OVERRIDING_ENV_VARS>
                                <!-- This corresponds to the /subsystem=custom resource and its my-attr attribute -->
                                <SUBSYSTEM_CUSTOM__MY_ATTR>5678</SUBSYSTEM_CUSTOM__MY_ATTR>
                                <!-- test that a complex attribute is not overidden -->
                                <SUBSYSTEM_CUSTOM__MY_LIST_ATTR>[a, b, c]</SUBSYSTEM_CUSTOM__MY_LIST_ATTR>
                            </environmentVariables>
                            <includes>
                                <include>org/jboss/as/controller/EnvVarAttributeOverrideModel$EnabledOverridingEnvVarTestCase</include>
                            </includes>
                            <excludes>
                                <exclude />
                            </excludes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
