<?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">

    <parent>
        <artifactId>webshop-integration</artifactId>
        <groupId>kz.allpay.mfs</groupId>
        <version>2.0.8.3</version>
    </parent>

    <artifactId>webshop-integration-demo</artifactId>
    <packaging>war</packaging>
    <modelVersion>4.0.0</modelVersion>

    <properties>
        <maven.deploy.skip>true</maven.deploy.skip>
    </properties>

    <profiles>
        <!-- environment group -->
        <profile>
            <id>demo_for_github</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <webshop.services.ip>test.all-pay.kz</webshop.services.ip>
                <where.to.redirect>test.all-pay.kz</where.to.redirect>
            </properties>
        </profile>
        <profile>
            <id>local</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <webshop.services.ip>127.0.0.1:8080</webshop.services.ip>
                <where.to.redirect>127.0.0.1:8080</where.to.redirect>
                <webshop.services.port></webshop.services.port>
            </properties>
        </profile>
        <profile>
            <id>alpha</id>
            <properties>
                <webshop.services.ip>alpha.allpay.kz</webshop.services.ip>
                <where.to.redirect>alpha.allpay.kz</where.to.redirect>
                <webshop.services.port>:8080</webshop.services.port>
            </properties>
        </profile>
        <profile>
            <id>beta</id>
            <properties>
                <webshop.services.ip>beta.allpay.kz</webshop.services.ip>
                <where.to.redirect>beta.allpay.kz</where.to.redirect>
                <webshop.services.port>:8080</webshop.services.port>
            </properties>
        </profile>
        <profile>
            <id>dmitry</id>
            <properties>
                <webshop.services.ip>192.168.6.49:8080</webshop.services.ip>
                <where.to.redirect>192.168.6.49:8080</where.to.redirect>
                <webshop.services.port></webshop.services.port>
            </properties>
        </profile>
    </profiles>

    <dependencies>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
        </dependency>

        <dependency>
            <groupId>kz.allpay.mfs</groupId>
            <artifactId>webshop-integration-keypair</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <finalName>webshop-integration-rest</finalName>
        <resources>
            <resource>
                <directory>src/main/webapp</directory>
                <targetPath>META-INF/resources</targetPath>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <inherited>true</inherited>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <packagingExcludes>WEB-INF/web.xml</packagingExcludes>
                    <webResources>
                        <resource>
                            <directory>${basedir}/src/main/webapp/WEB-INF</directory>
                            <targetPath>WEB-INF</targetPath>
                        </resource>
                    </webResources>
                </configuration>
            </plugin>

        </plugins>
    </build>

</project>