<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.cometd.javascript</groupId>
        <artifactId>cometd-javascript-project</artifactId>
        <version>1.1.2</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>cometd-javascript-dojo</artifactId>
    <packaging>war</packaging>
    <name>CometD :: JavaScript :: Dojo</name>

    <properties>
        <dojo-version>1.4.2</dojo-version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <overlays>
                        <overlay />
                        <overlay>
                            <groupId>org.cometd.javascript</groupId>
                            <artifactId>cometd-javascript-common</artifactId>
                        </overlay>
                        <overlay>
                            <groupId>org.dojotoolkit</groupId>
                            <artifactId>dojo-war</artifactId>
                            <excludes>
                                <exclude>META-INF/**</exclude>
                                <exclude>dojox/cometd.js</exclude>
                                <exclude>dojox/cometd</exclude>
                                <exclude>dojox/cometd/**</exclude>
                            </excludes>
                        </overlay>
                    </overlays>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>test-unpack</id>
                        <phase>generate-test-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.cometd.javascript</groupId>
                                    <artifactId>cometd-javascript-common-test</artifactId>
                                    <version>${project.version}</version>
                                    <type>jar</type>
                                    <outputDirectory>${project.build.directory}/scripts</outputDirectory>
                                    <includes>*.js</includes>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.cometd.javascript</groupId>
                                    <artifactId>cometd-javascript-common</artifactId>
                                    <version>${project.version}</version>
                                    <type>war</type>
                                    <outputDirectory>${project.build.directory}/scripts</outputDirectory>
                                    <includes>**/*.js</includes>
                                </artifactItem>
                                <artifactItem>
                                    <groupId>org.dojotoolkit</groupId>
                                    <artifactId>dojo-war</artifactId>
                                    <version>${dojo-version}</version>
                                    <type>war</type>
                                    <outputDirectory>${project.build.directory}/scripts</outputDirectory>
                                    <excludes>META-INF/**,dojox/cometd.js,dojox/cometd/**</excludes>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.cometd.javascript</groupId>
            <artifactId>cometd-javascript-common</artifactId>
            <version>${project.version}</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.cometd.javascript</groupId>
            <artifactId>cometd-javascript-common-test</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.dojotoolkit</groupId>
            <artifactId>dojo-war</artifactId>
            <version>${dojo-version}</version>
            <type>war</type>
        </dependency>
        <dependency>
            <groupId>org.cometd.java</groupId>
            <artifactId>cometd-api</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.cometd.java</groupId>
            <artifactId>cometd-java-server</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>${jetty-version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-client</artifactId>
            <version>${jetty-version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>
