<?xml version="1.0" encoding="UTF-8"?>
<!--
 * Copyright (c) 2014, stateful.co
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met: 1) Redistributions of source code must retain the above
 * copyright notice, this list of conditions and the following
 * disclaimer. 2) Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following
 * disclaimer in the documentation and/or other materials provided
 * with the distribution. 3) Neither the name of the stateful.co nor
 * the names of its contributors may be used to endorse or promote
 * products derived from this software without specific prior written
 * permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
 * THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 -->
<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>com.jcabi</groupId>
        <artifactId>parent</artifactId>
        <version>0.42</version>
    </parent>
    <groupId>co.stateful</groupId>
    <artifactId>java-sdk</artifactId>
    <version>0.13.2</version>
    <packaging>jar</packaging>
    <name>java-sdk</name>
    <description>Stateful Web Primitives</description>
    <url>http://www.stateful.co</url>
    <inceptionYear>2014</inceptionYear>
    <organization>
        <name>stateful.co</name>
        <url>http://www.stateful.co</url>
    </organization>
    <licenses>
        <license>
            <name>Stateful Web Primitives</name>
            <url>http://www.stateful.co/LICENSE.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>1</id>
            <name>Yegor Bugayenko</name>
            <email>yegor@tpc2.com</email>
            <organization>teamed.io</organization>
            <organizationUrl>http://www.teamed.io</organizationUrl>
            <roles>
                <role>Architect</role>
                <role>Developer</role>
            </roles>
            <timezone>-7</timezone>
        </developer>
    </developers>
    <issueManagement>
        <system>github</system>
        <url>https://github.com/sttc/java-sdk/issues</url>
    </issueManagement>
    <ciManagement>
        <system>rultor</system>
        <url>http://www.rultor.com/s/stateful</url>
    </ciManagement>
    <scm>
        <connection>scm:git:github.com:sttc/java-sdk.git</connection>
        <developerConnection>scm:git:github.com:sttc/java-sdk.git</developerConnection>
        <url>https://github.com/sttc/java-sdk</url>
    </scm>
    <distributionManagement>
        <site>
            <id>gh-pages</id>
            <url>http://java-sdk.stateful.co/</url>
        </site>
    </distributionManagement>
    <dependencies>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-aspects</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-log</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-http</artifactId>
            <version>1.14.2</version>
        </dependency>
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-manifests</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-xml</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-urn</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-matchers</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish</groupId>
            <artifactId>javax.json</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-client</artifactId>
            <version>1.19</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>com.sun.grizzly</groupId>
            <artifactId>grizzly-servlet-webserver</artifactId>
            <version>1.9.64</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration combine.children="append">
                    <archive>
                        <manifestEntries>
                            <Sttc-Version>${project.version}</Sttc-Version>
                            <Sttc-Revision>${buildNumber}</Sttc-Revision>
                            <Sttc-Date>${maven.build.timestamp}</Sttc-Date>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <configuration>
                    <parallel>none</parallel>
                    <systemPropertyVariables>
                        <sttc.urn>${sttc.urn}</sttc.urn>
                        <sttc.token>${sttc.token}</sttc.token>
                    </systemPropertyVariables>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>pdd</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.rempl.plugins</groupId>
                        <artifactId>rempl-maven-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <phase>generate-resources</phase>
                                <goals>
                                    <goal>read</goal>
                                </goals>
                                <configuration>
                                    <profiles>
                                        <profile>
                                            <type>com.rempl.pdd.PDDProfile</type>
                                            <arguments>
                                                <argument>${basedir}</argument>
                                                <argument>**</argument>
                                                <argument>target/**,**/target,.git/**</argument>
                                            </arguments>
                                        </profile>
                                    </profiles>
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>com.rempl.profiles</groupId>
                                <artifactId>rempl-pdd-profile</artifactId>
                                <version>1.7</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <artifactId>maven-site-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>pdd-site</id>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>site</goal>
                                </goals>
                                <configuration>
                                    <generateProjectInfo>false</generateProjectInfo>
                                    <reportPlugins combine.self="override">
                                        <plugin>
                                            <groupId>com.rempl.plugins</groupId>
                                            <artifactId>rempl-maven-plugin</artifactId>
                                            <configuration>
                                                <reports>
                                                    <report>
                                                        <type>com.rempl.pdd.SummaryReport</type>
                                                    </report>
                                                </reports>
                                            </configuration>
                                        </plugin>
                                    </reportPlugins>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>com.bazaarvoice.maven.plugins</groupId>
                        <artifactId>s3-upload-maven-plugin</artifactId>
                        <version>1.3</version>
                        <executions>
                            <execution>
                                <id>pdd-deploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>s3-upload</goal>
                                </goals>
                                <configuration>
                                    <bucketName>${pdd.s3.bucket}</bucketName>
                                    <accessKey>${pdd.s3.key}</accessKey>
                                    <secretKey>${pdd.s3.secret}</secretKey>
                                    <source>${project.build.directory}/site/rempl/com.rempl.pdd.SummaryReport/index.xml</source>
                                    <destination>${project.artifactId}.xml</destination>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
