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

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

  <build>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>main</id>
            <phase>prepare-package</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <copy file="${basedir}/src/main/webapp/js/dojox/cometd/main.js" tofile="${project.build.directory}/${project.build.finalName}/js/dojox/cometd.js" />
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <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>
              <targetPath>/js</targetPath>
              <excludes>
                <exclude>META-INF/**</exclude>
                <exclude>WEB-INF/**</exclude>
                <exclude>dojox/cometd.js*</exclude>
                <exclude>dojox/cometd</exclude>
                <exclude>dojox/cometd/**</exclude>
              </excludes>
            </overlay>
          </overlays>
        </configuration>
      </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.dojotoolkit</groupId>
      <artifactId>dojo-war</artifactId>
      <version>${dojo-version}</version>
      <type>war</type>
    </dependency>
  </dependencies>

</project>
