<?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>
    <parent>
        <groupId>test</groupId>
        <artifactId>test</artifactId>
        <version>1.0</version>
    </parent>

    <groupId>test</groupId>
    <artifactId>consumer</artifactId>
    <name>consumer</name>

    <packaging>war</packaging>

    <dependencies>
        <dependency>
            <groupId>test</groupId>
            <artifactId>provider</artifactId>
            <version>1.0</version>
            <type>ejb-client</type>
        </dependency>

        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-api</artifactId>
            <version>1.2_13</version>
        </dependency>
        <dependency>
            <groupId>javax.faces</groupId>
            <artifactId>jsf-impl</artifactId>
            <version>1.2_13</version>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.1.2</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>jsf-connector</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>com.sun.enterprise</groupId>
                    <artifactId>hk2</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>com.sun.faces</groupId>
                    <artifactId>jsf-impl</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.glassfish.common</groupId>
                    <artifactId>glassfish-api</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.glassfish.common</groupId>
                    <artifactId>common-util</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.glassfish.common</groupId>
                    <artifactId>container-common</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.glassfish.deployment</groupId>
                    <artifactId>dol</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.glassfish.maven.plugin</groupId>
                <artifactId>maven-glassfish-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <glassfishDirectory>${glassfish.dir}</glassfishDirectory>
                    <user>${glassfish.admin}</user>
                    <adminPassword>${glassfish.adminPassword}</adminPassword>
                    <debug>true</debug>
                    <domain>
                        <name>${glassfish.domain}</name>
                        <adminPort>4848</adminPort>
                        <httpPort>8080</httpPort>
                        <httpsPort>8443</httpsPort>
                    </domain>
                    <components>
                        <component>
                            <name>${project.build.finalName}</name>
                            <artifact>${project.build.directory}/${project.build.finalName}.jar</artifact>
                        </component>
                    </components>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>