<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2014 Red Hat, Inc., and individual contributors
  ~ as indicated by the @author tags.
  ~
  ~ 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.
  -->

<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>3.0.0.Beta8</version>
    </parent>

    <artifactId>wildfly-elytron</artifactId>

    <name>WildFly: Subsystem Artifact</name>

    <properties>
        <!-- TODO Elytron Remove once parent on M17 -->
        <version.org.apache.ds>2.0.0-M17</version.org.apache.ds>

        <test.level>INFO</test.level>
    </properties>


    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.apache.directory.server</groupId>
                <artifactId>apacheds-parent</artifactId>
                <version>${version.org.apache.ds}</version>
                <scope>import</scope>
                <type>pom</type>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-controller</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-server</artifactId>
        </dependency>

        <dependency>
            <groupId>org.wildfly.security</groupId>
            <artifactId>wildfly-elytron</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>*</artifactId>
                    <groupId>*</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>jboss-dmr</artifactId>
            <scope>provided</scope>
        </dependency>

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

        <dependency>
            <groupId>org.jboss.msc</groupId>
            <artifactId>jboss-msc</artifactId>
            <scope>provided</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>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-processor</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.jboss</groupId>
            <artifactId>staxmapper</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.wildfly.common</groupId>
            <artifactId>wildfly-common</artifactId>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.spec.javax.security.jacc</groupId>
            <artifactId>jboss-jacc-api_1.5_spec</artifactId>
            <scope>provided</scope>
        </dependency>

        <!-- Temporary due to backward compatibility with the configuration of JACC and related services -->
        <dependency>
            <groupId>org.picketbox</groupId>
            <artifactId>picketbox</artifactId>
        </dependency>

        <!-- TEST Dependencies -->
        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-subsystem-test</artifactId>
            <type>pom</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.wildfly.core</groupId>
            <artifactId>wildfly-controller-client</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jmockit</groupId>
            <artifactId>jmockit</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.directory.api</groupId>
            <artifactId>api-ldap-codec-standalone</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.jdbm</groupId>
            <artifactId>apacheds-jdbm1</artifactId>
            <type>bundle</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.server</groupId>
            <artifactId>apacheds-core-annotations</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.server</groupId>
            <artifactId>apacheds-interceptor-kerberos</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.directory.server</groupId>
            <artifactId>apacheds-server-annotations</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <systemPropertyVariables>
                        <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        <log4j.defaultInitOverride>true</log4j.defaultInitOverride>
                        <test.level>${test.level}</test.level>
                    </systemPropertyVariables>
                    <redirectTestOutputToFile>true</redirectTestOutputToFile>
                    <enableAssertions>true</enableAssertions>
                    <argLine>-Xmx512m</argLine>
                    <systemProperties>
                        <property>
                            <name>jboss.home</name>
                            <value>${jboss.home}</value>
                        </property>
                    </systemProperties>
                    <includes>
                        <include>**/*TestCase.java</include>
                    </includes>
                    <forkMode>once</forkMode>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>xml-maven-plugin</artifactId>
                <version>1.0.1</version>
                <configuration>
                    <validationSets>
                        <validationSet>
                            <dir>src/test/resources/org/wildfly/extension/elytron</dir>
                            <includes>
                                <include>*.xml</include>
                            </includes>
                            <systemId>src/main/resources/schema/wildfly-elytron_1_0.xsd</systemId>
                        </validationSet>
                        <validationSet>
                            <dir>src/main/resources/subsystem-templates</dir>
                        </validationSet>
                        <validationSet>
                            <dir>src/main/resources/schema</dir>
                        </validationSet>
                    </validationSets>
                </configuration>
                <executions>
                    <execution>
                        <id>xml-validation</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>validate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
