<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright 2015 Red Hat, Inc.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~   http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<!--
  Set these VM properties in your IDE debugger

  -Djava.util.logging.manager=org.jboss.logmanager.LogManager
  -Djboss.home=${workspace_loc:jboss-as-build}/target/jboss-as-9.0.0.Alpha1-SNAPSHOT
-->
<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.arquillian</groupId>
        <artifactId>wildfly-arquillian-parent</artifactId>
        <version>3.0.1.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>wildfly-arquillian-container-embedded</artifactId>

    <name>WildFly: Arquillian Embedded Container</name>
    <properties>
        <modular.jdk.args/>
    </properties>

    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>org.wildfly.arquillian</groupId>
            <artifactId>wildfly-arquillian-common</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-embedded</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-protocol</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.arquillian</groupId>
            <artifactId>wildfly-arquillian-protocol-jmx</artifactId>
        </dependency>
        <!-- Test Dependencies -->
        <dependency>
            <groupId>jakarta.enterprise</groupId>
            <artifactId>jakarta.enterprise.cdi-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.junit</groupId>
            <artifactId>arquillian-junit-container</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jboss.galleon</groupId>
                <artifactId>galleon-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- Works around WFCORE-4211 -->
                    <argLine>${modular.jdk.args}</argLine>
                    <!-- Fork every test because it will launch a separate AS instance -->
                    <forkMode>always</forkMode>
                    <systemPropertyVariables>
                        <maven.repo.local>${settings.localRepository}</maven.repo.local>
                        <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        <jboss.home>${jboss.home}</jboss.home>
                    </systemPropertyVariables>
                    <environmentVariables>
                        <JBOSS_HOME>${jboss.home}</JBOSS_HOME>
                    </environmentVariables>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>java11</id>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <properties>
                <modular.jdk.args>--add-modules=java.se</modular.jdk.args>
            </properties>
        </profile>
    </profiles>
</project>
