<?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>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <jdk.version>1.6</jdk.version>
        <maven.compiler.plugin.version>3.1</maven.compiler.plugin.version>
        <maven.source.plugin.version>2.2.1</maven.source.plugin.version>
        <maven.javadoc.plugin.version>2.9.1</maven.javadoc.plugin.version>
        <maven.release.plugin.version>2.4.2</maven.release.plugin.version>
        <s1.version>2.2.0</s1.version>
        <log4j.version>1.2.17</log4j.version>
        <slf4j.version>1.7.5</slf4j.version>
    </properties>

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>ru.systemate</groupId>
    <artifactId>morpholog-client</artifactId>
    <version>1.0.0</version>
    <packaging>jar</packaging>
    <description>Russian language tools</description>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/systemate/morpholog-java</url>
        <connection>scm:git:ssh://github.com/systemate/morpholog-java.git</connection>
        <developerConnection>scm:git:git+ssh://git@github.com/systemate/morpholog-java.git</developerConnection>
        <tag>morpholog-client-1.0.0</tag>
    </scm>
    <issueManagement>
        <system>GitHub Issue Management</system>
        <url>https://github.com/systemate/morpholog-java/issues</url>
    </issueManagement>

    <!-- FOR Native client testing
    <repositories>
        <repository>
            <id>systemate-repo</id>
            <url>${env.S8_REPO}/releases</url>
        </repository>
    </repositories>
    -->

    <dependencies>

        <!-- FOR Native client testing
        <dependency>
            <groupId>ru.systemate.morpholog</groupId>
            <artifactId>morpholog-core</artifactId>
            <version>1.0.0</version>
            <scope>test</scope>
        </dependency>
        -->

        <!-- S1-Platform -->
        <dependency>
            <groupId>org.s1-platform</groupId>
            <artifactId>s1-core</artifactId>
            <version>${s1.version}</version>
        </dependency>
        <dependency>
            <groupId>org.s1-platform</groupId>
            <artifactId>s1-testing</artifactId>
            <version>${s1.version}</version>
            <scope>test</scope>
            <type>pom</type>
        </dependency>

        <!-- Logging -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>${log4j.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>runtime</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${maven.source.plugin.version}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${maven.javadoc.plugin.version}</version>
                <configuration>
                    <excludePackageNames>ru.systemate.morpholog.phrase.internal</excludePackageNames>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>javadoc</goal>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>${maven.release.plugin.version}</version>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>${project.basedir}/../</directory>
                <includes>
                    <include>S8-LICENSE.txt</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <excludes>
                    <exclude>*.java</exclude>
                </excludes>
            </resource>
        </resources>
    </build>

    <profiles>
        <profile>
            <id>sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <passphrase>${gpg.passphrase}</passphrase>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>