<?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>

  <!-- ************************************************************* -->
  <!-- *** POM Relationships *************************************** -->
  <!-- ************************************************************* -->

  <parent>
    <groupId>org.nuiton.js</groupId>
    <artifactId>nuiton-js-lib</artifactId>
    <version>1.0.2</version>
  </parent>

  <artifactId>nuiton-js-jquery</artifactId>
  <version>2.1.1-1</version>

  <name>Nuiton JS :: JQuery</name>
  <description>JQuery jar packaging</description>

  <url>http://jquery.com/</url>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://github.com/jquery/jquery/blob/master/MIT-LICENSE.txt</url>
    </license>
  </licenses>

  <scm>
    <connection>scm:svn:https://svn.nuiton.org/nuiton-js/nuiton-js-jquery/tags/nuiton-js-jquery-2.1.1-1</connection>
    <developerConnection>scm:svn:https://svn.nuiton.org/nuiton-js/nuiton-js-jquery/tags/nuiton-js-jquery-2.1.1-1</developerConnection>
    <url>https://forge.nuiton.org/projects/nuiton-js/repository/show/nuiton-js-jquery/tags/nuiton-js-jquery-2.1.1-1</url>
  </scm>

  <properties>
    <license.licenseName>mit</license.licenseName>

    <upstreamVersion>2.1.1</upstreamVersion>
    <upstreamUrl>http://code.jquery.com/</upstreamUrl>
    <upstreamFile>jquery-${upstreamVersion}.js</upstreamFile>
    <destDir>${project.build.outputDirectory}/META-INF/resources/${project.artifactId}</destDir>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.nuiton.js</groupId>
      <artifactId>nuiton-js-test</artifactId>
      <version>1.0.2</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>wagon-maven-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>download-single</goal>
            </goals>
            <configuration>
              <url>${upstreamUrl}</url>
              <fromFile>${upstreamFile}</fromFile>
              <toFile>${project.build.directory}/${upstreamFile}</toFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-resources</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <target>
                <echo message="moving resources" />
                <copy todir="${destDir}" file="${project.build.directory}/${upstreamFile}" />
              </target>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
