<?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">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
    <relativePath />
  </parent>

  <groupId>net.jangaroo.com.sencha</groupId>
  <artifactId>ext-js-pkg-gpl</artifactId>
  <version>6.2.0</version>
  <packaging>pom</packaging>

  <description>Maven-packaged version of Ext JS 6, provided by Jangaroo.</description>
  <url>http://www.sencha.com/products/extjs</url>

  <organization>
    <name>Sencha</name>
    <url>http://www.sencha.com/</url>
  </organization>

  <licenses>
    <license>
      <url>http://www.sencha.com/products/extjs/license/</url>
    </license>
  </licenses>

  <scm>
    <url>http://github.com/CoreMedia/ext-js</url>
    <connection>scm:git:git://github.com/CoreMedia/ext-js.git</connection>
    <developerConnection>scm:git:git@github.com:CoreMedia/ext-js.git</developerConnection>
    <tag>ext-js-pkg-gpl-6.2.0</tag>
  </scm>

  <properties>
    <ext-js.artifactId>ext-js-gpl</ext-js.artifactId>
    <extjs.version>6.2.0</extjs.version>
    <extjs.build>981</extjs.build>
    <extjs.dir>ext-${extjs.version}</extjs.dir>
    <jangaroo.maven-plugin.version>4.0.37</jangaroo.maven-plugin.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  </properties>

  <prerequisites>
    <maven>3.0.3</maven>
  </prerequisites>

  <profiles>
    <profile>
      <id>release-signing</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${project.groupId}</groupId>
                  <artifactId>${ext-js.artifactId}</artifactId>
                  <version>${extjs.version}.${extjs.build}</version>
                  <type>zip</type>
                  <outputDirectory>target/unzip</outputDirectory>
                  <excludes>*/examples/**,*/build/examples/**,*/templates/**,*/welcome/**</excludes>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>net.jangaroo</groupId>
        <artifactId>jangaroo-maven-plugin</artifactId>
        <version>${jangaroo.maven-plugin.version}</version> <!-- explicit version for IDEA! -->
        <executions>
          <execution>
            <id>ext-packaging</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>package-ext</goal>
            </goals>
            <configuration>
              <extFrameworkDir>${project.build.directory}/unzip/${extjs.dir}</extFrameworkDir>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <finalName>${project.groupId}__${project.artifactId}</finalName>
          <appendAssemblyId>false</appendAssemblyId>
          <attach>false</attach>
          <descriptors>
            <descriptor>assembly.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>make-assembly</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.10</version>
        <executions>
          <execution>
            <id>attach-pkg</id>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>target/${project.groupId}__${project.artifactId}.zip</file>
                  <type>pkg</type>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>

    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-ssh</artifactId>
        <version>1.0-beta-6</version>
      </extension>
    </extensions>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.10</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>1.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>1.9.5</version>
          <configuration>
            <pushChanges>false</pushChanges>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.0.1</version>
          <configuration>
            <includeEmptyDirs>true</includeEmptyDirs>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
      </plugins>
    </pluginManagement>

  </build>

</project>
