<?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>
    <artifactId>org.gvsig.andami.updater</artifactId>
    <packaging>jar</packaging>
    <name>${project.artifactId}</name>
    <parent>
        <groupId>org.gvsig</groupId>
        <artifactId>org.gvsig.desktop.framework</artifactId>
        <version>2.0.30</version>
    </parent>
    
    <dependencies>
      <dependency>
          <groupId>org.slf4j</groupId>
          <artifactId>slf4j-api</artifactId>
          <scope>compile</scope>
      </dependency>
      <dependency>
          <groupId>org.gvsig</groupId>
          <artifactId>org.gvsig.tools.lib</artifactId>
          <scope>compile</scope>
      </dependency>
      <dependency>
          <groupId>org.gvsig</groupId>
          <artifactId>org.gvsig.installer.lib.api</artifactId>
          <scope>compile</scope>
      </dependency>
      <dependency>
        <groupId>org.apache.ant</groupId>
        <artifactId>ant</artifactId>
        <scope>compile</scope>
      </dependency>
      <dependency>
          <groupId>com.sardak</groupId>
          <artifactId>antform</artifactId>
          <scope>compile</scope>
      </dependency>
      
      <!--  Need to include dependencies with andami in the MANIFEST classpath entry -->
      <dependency>
          <groupId>org.gvsig</groupId>
          <artifactId>org.gvsig.andami</artifactId>
          <scope>runtime</scope>
      </dependency>
    </dependencies>

  <build>
    <plugins>

     <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <configuration>
              <archive>
                  <manifest>
                      <addClasspath>true</addClasspath>
                      <mainClass>org.gvsig.andamiupdater.Updater</mainClass>
                  </manifest>
              </archive>
          </configuration>
      </plugin>

        <plugin>
          <groupId>org.codehaus.gmaven</groupId>
          <artifactId>gmaven-plugin</artifactId>
          <executions>
            <execution>
              <id>install-plugin</id>
              <phase>install</phase>
              <goals>
                <goal>execute</goal>
              </goals>
              <configuration>
                <source><![CDATA[
                  ant = new AntBuilder()
                  source = project.basedir.getAbsolutePath() + 
                    "/target/" + 
                    project.artifactId + "-" +
                    project.version +
                    ".jar"
                  target = project.properties["gvsig.product.folder.path"] + 
                    "/lib/" +
                    project.artifactId + "-" +
                    project.version +
                    ".jar"
                  ant.copy(file: source, tofile: target)
                ]]></source>
              </configuration>
            </execution>
          </executions>
        </plugin>

    </plugins>
  </build>

            
</project>
