<?xml version="1.0" encoding="UTF-8"?>
<!--  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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.javamoney</groupId>
        <artifactId>javamoney-parent</artifactId>
        <version>1.0</version>
    </parent>

    <artifactId>javamoney-tck</artifactId>
    <packaging>jar</packaging>

    <version>1.0</version>

    <name>JSR 354 Technical Compatibility Kit (TCK)</name>

    <description>JSR 354 provides an API for representing, transporting, and performing comprehensive calculations with
        Money and Currency. This module implements JSR 354. This module provides the test code that is compatible with
        both the Java 7 and the Java 8 based API. The targeted API must be provided as well as the implementation
        under test to execute this TCK.
    </description>

    <licenses>
        <license>
            <name>Apache 2 License</name>
            <comments>Spec</comments>
            <url>LICENSE.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <properties>
        <jsr.version>1.0</jsr.version>
        <jdkVersion>1.7</jdkVersion>
        <maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
        <maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <moduleDir>.</moduleDir>
        <basedir>.</basedir>
        <testng.version>6.8.5</testng.version>
        <jboss.test.audit.version>1.1.0.Final</jboss.test.audit.version>
    </properties>

    <ciManagement>
        <system>Travis CI</system>
        <url>https://travis-ci.org/JavaMoney/jsr354-tck</url>
    </ciManagement>

    <mailingLists>
        <mailingList>
            <name>JSR354 Issues List</name>
            <subscribe>https://java.net/projects/javamoney/lists</subscribe>
            <unsubscribe>https://java.net/projects/javamoney/lists</unsubscribe>
            <archive>https://java.net/projects/javamoney/lists/issues/archive</archive>
            <post>issues@javamoney.java.net</post>
        </mailingList>
        <mailingList>
            <name>JSR354 Public Mailing List</name>
            <subscribe>https://java.net/projects/javamoney/lists</subscribe>
            <unsubscribe>https://java.net/projects/javamoney/lists</unsubscribe>
            <archive>http://java.net/projects/javamoney/lists/jcurrency_mail/archive</archive>
            <post>jcurrency_mail@javamoney.java.net</post>
        </mailingList>
    </mailingLists>

    <issueManagement>
        <system>JIRA</system>
        <url>http://java.net/jira/browse/JAVAMONEY</url>
    </issueManagement>


    <prerequisites>
        <maven>3.0.4</maven>
    </prerequisites>

    <scm>
        <connection>scm:git:https://github.com/JavaMoney/jsr354-org.javamoney.tck.git</connection>
        <tag>master</tag>
        <developerConnection>scm:git:https://github.com/JavaMoney/jsr354-org.javamoney.tck.git</developerConnection>
        <url>https://github.com/JavaMoney/jsr354-org.javamoney.tck</url>
    </scm>

    <distributionManagement>
        <repository>
            <id>bintray-release</id>
            <name>oss-jfrog-artifactory-release</name>
            <url>https://oss.jfrog.org/artifactory/oss-release-local</url>
        </repository>
        <snapshotRepository>
            <id>bintray-snapshot</id>
            <name>oss-jfrog-artifactory-snapshot</name>
            <url>https://oss.jfrog.org/artifactory/oss-snapshot-local</url>
        </snapshotRepository>
    </distributionManagement>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>${testng.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.money</groupId>
                <artifactId>money-api-bp</artifactId>
                <version>${jsr.version}</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mutabilitydetector</groupId>
                <artifactId>MutabilityDetector</artifactId>
                <version>0.9.1</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.test-audit</groupId>
                <artifactId>jboss-test-audit-api</artifactId>
                <version>${jboss.test.audit.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.jboss.test-audit</groupId>
                <artifactId>jboss-test-audit-impl</artifactId>
                <version>${jboss.test.audit.version}</version>
                <optional>true</optional>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.mutabilitydetector</groupId>
            <artifactId>MutabilityDetector</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.money</groupId>
            <artifactId>money-api-bp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>org.javamoney</groupId>
            <artifactId>moneta-bp</artifactId>
            <version>${jsr.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.test-audit</groupId>
            <artifactId>jboss-test-audit-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.test-audit</groupId>
            <artifactId>jboss-test-audit-impl</artifactId>
        </dependency>
    </dependencies>

    <build>
        <defaultGoal>install</defaultGoal>

        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.4</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-webdav-jackrabbit</artifactId>
                <version>2.2</version>
            </extension>
        </extensions>

        <pluginManagement>
            <plugins>
                <!-- ======================================================= -->
                <!-- Packaging (OSGi bundle) -->
                <!-- ======================================================= -->
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.3.5</version>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Export-Package>org.javamoney.* "org.javamoney.org.javamoney.tck.*</Export-Package>
                            <Private-Package>!*</Private-Package>
                        </instructions>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <debug>true</debug>
                    <optimize>false</optimize>
                    <verbose>true</verbose>
                    <source>${maven.compile.sourceLevel}</source>
                    <target>${maven.compile.targetLevel}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <testFailureIgnore>true</testFailureIgnore>
                    <testClassesDirectory>${project.build.directory}/classes</testClassesDirectory>
                    <additionalClasspathElements>
                        <additionalClasspathElement>${project.build.directory}/test-classes</additionalClasspathElement>
                    </additionalClasspathElements>
                </configuration>
            </plugin>

            <!-- ======================================================= -->
            <!-- Packaging (OSGi bundle) -->
            <!-- ======================================================= -->
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctor-maven-plugin</artifactId>
                <version>1.5.2</version>
                <dependencies>
                    <dependency>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctorj-pdf</artifactId>
                        <version>1.5.0-alpha.6</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <sourceDirectory>src/main/asciidoc</sourceDirectory>
                    <baseDir>${project.basedir}</baseDir>
                    <imagesDir>src/main/asciidoc/images/</imagesDir>
                    <embedAssets>true</embedAssets>
                    <!-- eruby>erubis</eruby -->
                </configuration>
                <executions>
                    <execution>
                        <id>output-html</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/docs</outputDirectory>
                            <sourceHighlighter>coderay</sourceHighlighter>
                            <backend>html</backend>
                        </configuration>
                    </execution>
                    <execution>
                        <id>output-pdf</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>process-asciidoc</goal>
                        </goals>
                        <configuration>
                            <backend>pdf</backend>
                            <!-- WARNING callout bullets don't yet work with CodeRay -->
                            <sourceHighlighter>coderay</sourceHighlighter>
                            <attributes>
                                <pagenums/>
                                <toc/>
                                <idprefix/>
                                <idseparator>-</idseparator>
                            </attributes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <repositories>
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>bintray-release</id>
            <name>libs-release</name>
            <url>http://oss.jfrog.org/artifactory/libs-release</url>
        </repository>
        <repository>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <id>bintray-snapshot</id>
            <name>libs-snapshot</name>
            <url>http://oss.jfrog.org/artifactory/libs-snapshot</url>
        </repository>
        <repository>
            <id>jboss-maven2-brew</id>
            <name>JBoss Maven 2 Brew Repository</name>
            <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
        </repository>
        <repository>
            <id>jboss-maven2-snapshots</id>
            <name>JBoss Maven 2 Brew Repository</name>
            <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
        </repository>
    </repositories>


    <profiles>
        <profile>
            <id>audit</id>
            <activation>
                <property>
                    <name>createTCKReport</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.bsc.maven</groupId>
                            <artifactId>maven-processor-plugin</artifactId>
                            <version>2.0.7</version>
                            <configuration>
                                <defaultOutputDirectory>${basedir}/target/coverage-report</defaultOutputDirectory>
                                <processors>
                                    <processor>org.jboss.test.audit.report.CoverageProcessor</processor>
                                </processors>
                                <outputClassDirectory>${basedir}/target/classes</outputClassDirectory>
                                <compilerArguments>
                                    -AauditXml=${basedir}/test-audit.xml -AoutputDir=${basedir}/target/coverage-report
                                    -source ${jdkVersion} -target ${jdkVersion}
                                </compilerArguments>
                            </configuration>
                            <executions>
                                <execution>
                                    <id>process</id>
                                    <phase>generate-sources</phase>
                                    <goals>
                                        <goal>process-test</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.bsc.maven</groupId>
                        <artifactId>maven-processor-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>travis</id>
            <activation>
                <property>
                    <name>env.TRAVIS</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.eluder.coveralls</groupId>
                        <artifactId>coveralls-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-gpg-plugin</artifactId>
                            <version>1.4</version>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <configuration>
                            <defaultKeyring>false</defaultKeyring>
                            <keyname>0E3BCC9A</keyname>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
