<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You 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.openssl</groupId>
        <artifactId>wildfly-openssl-parent</artifactId>
        <version>1.0.10.Final</version>
        <relativePath>../</relativePath>
    </parent>

    <groupId>org.wildfly.openssl</groupId>
    <artifactId>wildfly-openssl-java</artifactId>
    <version>1.0.10.Final</version>

    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>

            <!-- 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}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>check-style</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>checkstyle</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.17</version>

                <configuration>
                    <redirectTestOutputToFile>${maven.test.redirectTestOutputToFile}</redirectTestOutputToFile>
                    <forkMode>once</forkMode>
                    <systemProperties>
                        <javax.net.ssl.keyStore>src/test/resources/client.keystore</javax.net.ssl.keyStore>
                        <javax.net.ssl.trustStore>src/test/resources/client.truststore</javax.net.ssl.trustStore>
                        <javax.net.ssl.keyStorePassword>password</javax.net.ssl.keyStorePassword>
                        <org.wildfly.openssl.path>${openssl.path}</org.wildfly.openssl.path>
                        <org.wildfly.openssl.test.host>${org.wildfly.openssl.test.host}</org.wildfly.openssl.test.host>
                        <org.wildfly.openssl.test.port>${org.wildfly.openssl.test.port}</org.wildfly.openssl.test.port>
                        <org.wildfly.openssl.test.secondary.port>${org.wildfly.openssl.test.secondary.port}</org.wildfly.openssl.test.secondary.port>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>mac</id>
            <activation>
                <os>
                    <family>mac</family>
                </os>
            </activation>

            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-macosx-x86_64</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>linux-aarch64</id>
            <activation>
                <os>
                    <family>linux</family>
                    <arch>aarch64</arch>
                </os>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-linux-aarch64</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>linux-ppc64le</id>
            <activation>
                <os>
                    <family>linux</family>
                    <arch>ppc64le</arch>
                </os>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-linux-ppc64le</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>linux-s390x</id>
            <activation>
                <os>
                    <family>linux</family>
                    <arch>s390x</arch>
                </os>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-linux-s390x</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>linux-i386</id>
            <activation>
                <os>
                    <family>linux</family>
                </os>
                <property>
                    <name>sun.arch.data.model</name>
                    <value>32</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-linux-i386</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>linux-x86_64</id>
            <activation>
                <os>
                    <family>linux</family>
                    <arch>amd64</arch>
                </os>
                <property>
                    <name>sun.arch.data.model</name>
                    <value>64</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-linux-x86_64</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>windows-x86</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
                <property>
                    <name>sun.arch.data.model</name>
                    <value>32</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-windows-i386</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>windows-x64</id>
            <activation>
                <os>
                    <family>windows</family>
                </os>
                <property>
                    <name>sun.arch.data.model</name>
                    <value>64</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-windows-x86_64</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>solaris-x64</id>
            <activation>
                <os>
                    <name>sunos</name>
                    <arch>amd64</arch>
                </os>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-solaris-x86_64</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>solaris-sparcv9</id>
            <activation>
                <os>
                    <name>sunos</name>
                    <arch>sparcv9</arch>
                </os>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.openssl</groupId>
                    <artifactId>wildfly-openssl-solaris-sparcv9</artifactId>
                    <version>${project.version}</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <skip>false</skip>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
