<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2013 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">

    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>16</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>

    <groupId>org.wildfly.security</groupId>
    <artifactId>wildfly-elytron</artifactId>
    <version>1.0.2.Final</version>

    <name>WildFly Elytron</name>
    <description>WildFly Security SPIs</description>

    <issueManagement>
        <system>Jira</system>
        <url>https://issues.jboss.org/browse/ELY</url>
    </issueManagement>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>

    <scm>
        <connection>svm:git@github.com:wildfly-security/wildfly-elytron.git</connection>
        <url>https://github.com/wildfly-security/wildfly-elytron</url>
    </scm>

    <properties>
        <version.org.jboss.logging>3.2.1.Final</version.org.jboss.logging>
        <version.org.jboss.logmanager>2.0.0.Final</version.org.jboss.logmanager>
        <version.org.jboss.logmanager.log4j-jboss>1.1.2.Final</version.org.jboss.logmanager.log4j-jboss>
        <version.org.jboss.logging.tools>2.0.1.Final</version.org.jboss.logging.tools>
        <version.org.jboss.modules>1.4.3.Final</version.org.jboss.modules>
        <version.org.jboss.slf4j>1.0.3.GA</version.org.jboss.slf4j>
        <version.org.kohsuke.metainf-services.metainf-services>1.5-jboss-1</version.org.kohsuke.metainf-services.metainf-services>
        <version.junit.junit>4.11</version.junit.junit>
        <version.org.wildfly.checkstyle-config>1.0.3.Final</version.org.wildfly.checkstyle-config>
        <version.org.wildfly.common>1.0.0.Final</version.org.wildfly.common>
        <version.com.puppycrawl.tools.checkstyle>6.3</version.com.puppycrawl.tools.checkstyle>

        <test.level>INFO</test.level>
        <!-- Checkstyle configuration -->
        <linkXRef>false</linkXRef>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <build>
        <resources>
            <resource>
                <directory>${project.build.sourceDirectory}</directory>
                <includes>
                    <include>**/*.properties</include>
                </includes>
                <filtering>true</filtering>
            </resource>
        </resources>

        <plugins>
           <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>

                <!-- Surefire -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.surefire.plugin}</version>
                    <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>
                        <trimStackTrace>false</trimStackTrace>
                        <printSummary>true</printSummary>
                        <includes>
                            <include>**/*Test.java</include>
                            <include>**/*TestSuite.java</include>
                        </includes>
                        <forkMode>always</forkMode>
                    </configuration>
                </plugin>

                <!-- JAR -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${version.jar.plugin}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <mainClass>org.wildfly.security._private.Main</mainClass>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>

                <!-- Javadoc -->
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <configuration>
                        <doclet>net.gleamynode.apiviz.APIviz</doclet>
                        <docletArtifact>
                            <groupId>org.jboss.apiviz</groupId>
                            <artifactId>apiviz</artifactId>
                            <version>1.3.2.GA</version>
                        </docletArtifact>
                        <excludePackageNames>*._private</excludePackageNames>
                    </configuration>
                </plugin>

                <!-- Checkstyle -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${version.checkstyle.plugin}</version>
                    <configuration>
                        <configLocation>wildfly-checkstyle/checkstyle.xml</configLocation>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <useFile/>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.wildfly.checkstyle</groupId>
                            <artifactId>wildfly-checkstyle-config</artifactId>
                            <version>${version.org.wildfly.checkstyle-config}</version>
                        </dependency>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${version.com.puppycrawl.tools.checkstyle}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>check-style</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>checkstyle</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <version>${version.org.jboss.logging}</version>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-annotations</artifactId>
            <version>${version.org.jboss.logging.tools}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-processor</artifactId>
            <version>${version.org.jboss.logging.tools}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.modules</groupId>
            <artifactId>jboss-modules</artifactId>
            <version>${version.org.jboss.modules}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.kohsuke.metainf-services</groupId>
            <artifactId>metainf-services</artifactId>
            <version>${version.org.kohsuke.metainf-services.metainf-services}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.wildfly.common</groupId>
            <artifactId>wildfly-common</artifactId>
            <version>${version.org.wildfly.common}</version>
            <scope>provided</scope>
        </dependency>

        <!--
              Test Scope Only
         -->


        <dependency>
            <groupId>org.jboss.logmanager</groupId>
            <artifactId>jboss-logmanager</artifactId>
            <version>${version.org.jboss.logmanager}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.logmanager</groupId>
            <artifactId>log4j-jboss-logmanager</artifactId>
            <version>${version.org.jboss.logmanager.log4j-jboss}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.slf4j</groupId>
            <artifactId>slf4j-jboss-logmanager</artifactId>
            <version>${version.org.jboss.slf4j}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${version.junit.junit}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
