<?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">
  <parent>
    <artifactId>jangaroo-libs-parent</artifactId>
    <groupId>net.jangaroo</groupId>
    <version>4.1.2</version>
    <relativePath>../jangaroo-libs-parent/pom.xml</relativePath>
  </parent>
  <packaging>pom</packaging>
  <modelVersion>4.0.0</modelVersion>
  <artifactId>jangaroo-sdk</artifactId>
  <name>jangaroo-sdk</name>
  <description>All Jangaroo binaries and standard libraries as a single download</description>

  <dependencies>
    <dependency>
      <groupId>net.jangaroo</groupId>
      <artifactId>jangaroo-distribution</artifactId>
      <version>${jangaroo.version}</version>
      <type>zip</type>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>net.jangaroo</groupId>
      <artifactId>jangaroo-browser</artifactId>
      <version>${project.version}</version>
      <type>swc</type>
    </dependency>
    <dependency>
      <groupId>net.jangaroo</groupId>
      <artifactId>jangaroo-net</artifactId>
      <version>${project.version}</version>
      <type>swc</type>
    </dependency>
    <dependency>
      <groupId>net.jangaroo</groupId>
      <artifactId>jooflash-core</artifactId>
      <version>${project.version}</version>
      <type>swc</type>
    </dependency>
    <dependency>
      <groupId>net.jangaroo</groupId>
      <artifactId>jooflash</artifactId>
      <version>${project.version}</version>
      <type>swc</type>
    </dependency>
    <dependency>
      <groupId>net.jangaroo</groupId>
      <artifactId>ckeditor4</artifactId>
      <version>${project.version}</version>
      <type>swc</type>
    </dependency>
  </dependencies>

  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.5</version>    <!-- force to 2.5 because of http://jira.codehaus.org/browse/MRESOURCES-104 -->
        </plugin>
      </plugins>
    </pluginManagement>

    <plugins>
      <plugin>
        <groupId>net.jangaroo</groupId>
        <artifactId>jangaroo-maven-plugin</artifactId>
        <extensions>true</extensions>
        <version>${jangaroo.version}</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-jangaroo-bin</id>
            <phase>package</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/work/bin</outputDirectory>
              <includeTypes>zip</includeTypes>
            </configuration>
          </execution>
          <execution>
            <id>copy-jangaroo-libs</id>
            <phase>package</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/work/libs</outputDirectory>
              <includeTypes>jar</includeTypes>
              <includeScope>compile</includeScope>
            </configuration>
          </execution>
          <execution>
            <id>unpack-jangaroo-libs-meta</id>
            <phase>package</phase>
            <goals>
              <goal>unpack-dependencies</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/work/meta</outputDirectory>
              <includeTypes>jar</includeTypes>
              <includeScope>compile</includeScope>
              <includes>META-INF/joo-api/**,*.xsd,joo/*.module.js</includes>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <stripVersion>true</stripVersion>
          <overWriteReleases>true</overWriteReleases>
          <overWriteSnapshots>true</overWriteSnapshots>
          <overWriteIfNewer>true</overWriteIfNewer>
          <artifactItems />
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2</version>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <appendAssemblyId>false</appendAssemblyId>
          <descriptor>${project.basedir}/src/assemble/download.xml</descriptor>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
