<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.dojotoolkit</groupId>
      <artifactId>dojo-maven</artifactId>
      <version>1.10.3</version>
  </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>dojo</artifactId>
  <packaging>pom</packaging>
  <name>Dojo Toolkit :: Bundles</name>
  <url>http://dojotoolkit.org</url>

  <properties>
    <dojo.build.profile>standard</dojo.build.profile>
    <dojo.build.action>release</dojo.build.action>
  </properties>

  <build>
    <defaultGoal>install</defaultGoal>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>wagon-maven-plugin</artifactId>
        <version>1.0-beta-1</version>
        <executions>
          <execution>
            <id>download-dojo</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>download-single</goal>
            </goals>
            <configuration>
              <serverId>dojotoolkit</serverId>
              <url>http://download.dojotoolkit.org/release-${dojo.version}</url>
              <fromFile>dojo-release-${dojo.version}.tar.gz</fromFile>
              <toDir>${project.build.directory}</toDir>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <configuration>
              <target>
                <untar compression="gzip" src="${project.build.directory}/dojo-release-${dojo.version}.tar.gz" dest="${project.build.directory}" />
              </target>
            </configuration>
            <phase>process-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
           <descriptors>
            <descriptor>src/main/assembly/dojo.xml</descriptor>
          </descriptors>
          <tarLongFileMode>gnu</tarLongFileMode>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
