<!--
  ~ 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>

    <name>JBoss Log Manager</name>
    <description>An implementation of java.util.logging.LogManager</description>
    <groupId>org.jboss.logmanager</groupId>
    <artifactId>jboss-logmanager</artifactId>
    <packaging>jar</packaging>
    <version>2.1.0.Alpha5</version>

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

    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://repository.jboss.org/licenses/apache-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <!-- Dependency versions -->
        <version.javax.json>1.0</version.javax.json>
        <version.org.byteman>3.0.10</version.org.byteman>
        <version.org.glassfish.javax.json>1.0.4</version.org.glassfish.javax.json>
        <version.org.jboss.modules.jboss-modules>1.5.2.Final</version.org.jboss.modules.jboss-modules>
        <version.org.wildfly.common.wildfly-common>1.2.0.Final</version.org.wildfly.common.wildfly-common>
        <version.junit.junit>4.12</version.junit.junit>

        <!-- Plugin versions -->
        <version.org.jboss.apiviz.plugin>1.3.2.GA</version.org.jboss.apiviz.plugin>

        <!-- Test properties -->
        <org.jboss.test.address>127.0.0.1</org.jboss.test.address>
        <org.jboss.test.port>4560</org.jboss.test.port>
        <org.jboss.test.alt.port>14560</org.jboss.test.alt.port>

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

    <dependencies>
        <dependency>
            <groupId>org.jboss.modules</groupId>
            <artifactId>jboss-modules</artifactId>
            <version>${version.org.jboss.modules.jboss-modules}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.wildfly.common</groupId>
            <artifactId>wildfly-common</artifactId>
            <version>${version.org.wildfly.common.wildfly-common}</version>
        </dependency>

        <dependency>
            <groupId>javax.json</groupId>
            <artifactId>javax.json-api</artifactId>
            <version>${version.javax.json}</version>
            <!-- only required for the JsonFormatter -->
            <optional>true</optional>
        </dependency>
        <!-- JSON implementation -->
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.json</artifactId>
            <version>${version.org.glassfish.javax.json}</version>
            <!-- only required for the JsonFormatter, another implementation of the JSON-P API may be used as well -->
            <optional>true</optional>
        </dependency>

        <!-- test dependencies -->

        <dependency>
            <groupId>org.jboss.byteman</groupId>
            <artifactId>byteman</artifactId>
            <version>${version.org.byteman}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.byteman</groupId>
            <artifactId>byteman-submit</artifactId>
            <version>${version.org.byteman}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.byteman</groupId>
            <artifactId>byteman-install</artifactId>
            <version>${version.org.byteman}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.jboss.byteman</groupId>
            <artifactId>byteman-bmunit</artifactId>
            <version>${version.org.byteman}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${version.junit.junit}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*Tests.java</include>
                    </includes>
                    <systemPropertyVariables>
                        <jdk.attach.allowAttachSelf>true</jdk.attach.allowAttachSelf>
                        <java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
                        <test.log.dir>${project.build.directory}${file.separator}logs${file.separator}</test.log.dir>
                        <!-- Configured for SocketHandler SSL test -->
                        <javax.net.ssl.keyStore>${project.basedir}/src/test/resources/server-keystore.jks</javax.net.ssl.keyStore>
                        <javax.net.ssl.keyStorePassword>testpassword</javax.net.ssl.keyStorePassword>
                        <javax.net.ssl.trustStore>${project.basedir}/src/test/resources/client-keystore.jks</javax.net.ssl.trustStore>
                        <javax.net.ssl.trustStorePassword>testpassword</javax.net.ssl.trustStorePassword>
                        <org.jboss.test.address>${org.jboss.test.address}</org.jboss.test.address>
                        <org.jboss.test.port>${org.jboss.test.port}</org.jboss.test.port>
                        <org.jboss.test.alt.port>${org.jboss.test.alt.port}</org.jboss.test.alt.port>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <!-- Adding OSGI metadata to the JAR without changing the packaging type. -->
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>
                            ${project.groupId}.*;version=${project.version};-split-package:=error
                        </Export-Package>
                    </instructions>
                </configuration>
                <executions>
                    <execution>
                        <id>bundle-manifest</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>manifest</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <doclet>net.gleamynode.apiviz.APIviz</doclet>
                    <docletArtifact>
                        <groupId>org.jboss.apiviz</groupId>
                        <artifactId>apiviz</artifactId>
                        <version>${version.org.jboss.apiviz.plugin}</version>
                    </docletArtifact>
                    <doctitle>JBoss LogManager ${project.version}</doctitle>
                    <header>JBoss LogManager ${project.version}</header>
                    <footer>JBoss LogManager ${project.version}</footer>
                    <bottom><![CDATA[<i>Copyright &#169; 2017 JBoss, a division of Red Hat, Inc.</i>]]></bottom>
                    <links>
                        <link>http://docs.oracle.com/javase/8/docs/api/</link>
                    </links>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>
