<?xml version="1.0" encoding="UTF-8"?>
<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>

    <groupId>info.datamuse</groupId>
    <artifactId>currency-exchange-rates</artifactId>
    <version>0.1-alpha</version>

    <name>Currency Exchange Rates library</name>
    <description>
        Implements fetching currency exchange rates from different providers,
        as well as caching the fetched rates for quick retrieval.
    </description>
    <url>https://github.com/vdvoretskyi/currency-exchange-rates</url>

    <organization>
        <name>Datamuse</name>
        <url>https://www.datamuse.info</url>
    </organization>

    <scm>
        <url>https://github.com/vdvoretskyi/currency-exchange-rates</url>
        <connection>scm:git:git://github.com/vdvoretskyi/currency-exchange-rates.git</connection>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/vdvoretskyi/currency-exchange-rates/issues</url>
    </issueManagement>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>vladislav_dvoretskyi</id>
            <name>Vladyslav Dvoretskyi</name>
            <email>jasper.ua@gmail.com</email>
            <url>https://www.facebook.com/vladislav.dvoretsky</url>
            <organization>Datamuse</organization>
            <organizationUrl>https://www.datamuse.info</organizationUrl>
            <roles>
                <role>developer</role>
                <role>architect</role>
            </roles>
            <timezone>Europe/Kiev</timezone>
        </developer>
        <developer>
            <id>alex_shesterov</id>
            <name>Alex Shesterov</name>
            <email>alex.shesterov@gmail.com</email>
            <url>https://www.facebook.com/alex.shesterov</url>
            <organization>Datamuse</organization>
            <organizationUrl>https://www.datamuse.info</organizationUrl>
            <roles>
                <role>developer</role>
                <role>architect</role>
            </roles>
            <timezone>Europe/Berlin</timezone>
        </developer>
    </developers>

    <distributionManagement>
        <repository>
            <id>oss.sonatype.org</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>oss.sonatype.org</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <packaging>jar</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.version>3.5.4</maven.version>
        <java.source.version>1.8</java.source.version>
        <java.target.version>1.8</java.target.version>

        <slf4j.version>1.7.25</slf4j.version>
        <org.json.version>20180130</org.json.version>
        <jedis.version>2.9.0</jedis.version>

        <junit.jupiter.version>5.2.0</junit.jupiter.version>
        <hamcrest.version>2.0.0.0</hamcrest.version>
        <logback.version>1.2.3</logback.version>
        <apache.commons.lang3.version>3.7</apache.commons.lang3.version>

        <maven.cleanPlugin.version>3.0.0</maven.cleanPlugin.version>
        <maven.enforcerPlugin.version>3.0.0-M1</maven.enforcerPlugin.version>
        <maven.compilerPlugin.version>3.7.0</maven.compilerPlugin.version>
        <maven.resourcesPlugin.version>3.0.2</maven.resourcesPlugin.version>
        <maven.surefirePlugin.version>2.22.0</maven.surefirePlugin.version>
        <maven.jarPlugin.version>3.0.2</maven.jarPlugin.version>
        <maven.installPlugin.version>2.5.2</maven.installPlugin.version>
        <maven.sitePlugin.version>3.7.1</maven.sitePlugin.version>
        <maven.deployPlugin.version>2.8.2</maven.deployPlugin.version>
        <maven.gpgPlugin.version>1.6</maven.gpgPlugin.version>
        <maven.sourcePlugin.version>3.0.1</maven.sourcePlugin.version>
        <maven.javadocPlugin.version>3.0.1</maven.javadocPlugin.version>
        <maven.nexusStagingPlugin>1.6.7</maven.nexusStagingPlugin>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>${org.json.version}</version>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
            <version>${jedis.version}</version>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>java-hamcrest</artifactId>
            <version>${hamcrest.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${logback.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>${apache.commons.lang3.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>${maven.cleanPlugin.version}</version>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>${maven.enforcerPlugin.version}</version>
                <executions>
                    <execution>
                        <id>enforce</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>${maven.version}</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>${java.version}</version>
                                </requireJavaVersion>
                                <requirePluginVersions/>
                                <requireReleaseDeps/>
                                <dependencyConvergence/>
                                <requireUpperBoundDeps/>
                                <banDistributionManagement/>
                                <banDuplicatePomDependencyVersions/>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compilerPlugin.version}</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <source>${java.source.version}</source>
                    <target>${java.target.version}</target>
                    <debug>false</debug>
                    <optimize>true</optimize>
                    <showWarnings>true</showWarnings>
                    <showDeprecation>true</showDeprecation>
                    <compilerArgs>
                        <arg>-Xlint:-options</arg>
                        <arg>-Xlint:all</arg>
                        <arg>-Werror</arg>
                    </compilerArgs>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven.resourcesPlugin.version}</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven.surefirePlugin.version}</version>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <runOrder>random</runOrder>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>${maven.jarPlugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
                <version>${maven.installPlugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>${maven.sitePlugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>${maven.deployPlugin.version}</version>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven.sourcePlugin.version}</version>
                        <executions>
                            <execution>
                                <id>package-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- To generate javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven.javadocPlugin.version}</version>
                        <executions>
                            <execution>
                                <id>package-javadoc</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven.gpgPlugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${maven.nexusStagingPlugin}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>oss.sonatype.org</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <description>${project.version}</description>
                        </configuration>
                        <executions>
                            <execution>
                                <id>deploy-to-sonatype</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                    <goal>release</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
