<?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/maven-v4_0_0.xsd">
    <parent>
        <groupId>org.atmosphere</groupId>
        <artifactId>atmosphere-project</artifactId>
        <version>2.0.0.RC2</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.atmosphere.samples</groupId>
    <artifactId>atmosphere-samples</artifactId>
    <packaging>pom</packaging>
    <version>2.0.0.RC2</version>
    <name>atmosphere-samples</name>
    <modules>
        <!-- sample using jQuery.atmosphere.js-->
        <module>chat</module>
        <module>commons</module>
        <module>rest-chat</module>
        <module>scala-chat</module>
        <module>meteor-chat</module>
        <module>sse-chat</module>
        <module>sse-rest-chat</module>
        <module>chat-multiroom</module>
        <module>pubsub</module>
        <module>atmospherehandler-pubsub</module>

        <module>jersey-pubsub</module>
        <module>meteor-pubsub</module>
        <module>jquery-websockethandler-pubsub</module>
        <module>twitter-live-feed</module>
        <module>atmosphere-ee6</module>
        <module>channel</module>
        <module>async-annotation-pubsub</module>
        <module>all-api-pubsub</module>
        <module>jquery-multirequest</module>
        <module>websocket-chat</module>
    </modules>
    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>${jetty8-version}</version>
                <configuration>
                    <webAppSourceDirectory>${project.build.directory}/${project.name}</webAppSourceDirectory>
                    <scanIntervalSeconds>1</scanIntervalSeconds>
                    <webAppConfig>
                        <contextPath>/</contextPath>
                    </webAppConfig>
                    <connectors>
                        <connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
                            <port>8080</port>
                            <maxIdleTime>60000</maxIdleTime>
                        </connector>
                    </connectors>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.atmosphere</groupId>
                <artifactId>atmosphere-runtime</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.geronimo.specs</groupId>
                <artifactId>geronimo-servlet_3.0_spec</artifactId>
                <version>1.0</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback-version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <profiles>
        <profile>
            <id>tomcat</id>
            <dependencies>
                <dependency>
                    <groupId>org.atmosphere</groupId>
                    <artifactId>atmosphere-runtime</artifactId>
                    <version>${project.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>org.atmosphere</groupId>
                            <artifactId>atmosphere-compat-tomcat</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.1.1</version>
                        <configuration>
                            <packagingExcludes>WEB-INF/context.xml,META-INF/context.xml</packagingExcludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>jbossweb</id>
            <dependencies>
                <dependency>
                    <groupId>org.atmosphere</groupId>
                    <artifactId>atmosphere-runtime</artifactId>
                    <version>${project.version}</version>
                    <exclusions>
                        <exclusion>
                            <groupId>org.atmosphere</groupId>
                            <artifactId>atmosphere-compat-jbossweb</artifactId>
                        </exclusion>
                    </exclusions>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.1.1</version>
                        <configuration>
                            <packagingExcludes>WEB-INF/context.xml,META-INF/context.xml</packagingExcludes>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
