<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">
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.geoscript</groupId>
  <artifactId>geoscript-py</artifactId>
  <packaging>jar</packaging>
  <version>1.5-SNAPSHOT</version>
  <name>GeoScript Python</name>

  <repositories>
   <repository>
   <id>osgeo-releases</id>
   <name>OSGeo Nexus Release Repository</name>
   <url>https://repo.osgeo.org/repository/release/</url>
   <!-- contains release (including third-party-dependences)               -->
   <!-- Restlet maven Repository (http://maven.restlet.org)                             -->
   <!-- ucar (https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases) -->
   <snapshots>
     <enabled>false</enabled>
   </snapshots>
   <releases>
     <enabled>true</enabled>
   </releases>
  </repository>

  <repository>
   <id>osgeo-snapshots</id>
   <name>OSGeo Nexus Snapshot Repository</name>
   <url>https://repo.osgeo.org/repository/snapshot/</url>
   <!-- contains snapshots               -->
   <snapshots>
    <enabled>true</enabled>
   </snapshots>
   <releases>
    <enabled>false</enabled>
   </releases>
  </repository>
   
   <repository>
      <id>geosolutions</id>
      <name>geosolutions repository</name>
      <url>http://maven.geo-solutions.it/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
     <releases>
       <enabled>true</enabled>
     </releases>
    </repository>
  </repositories>

  <distributionManagement>
	<!-- use the following if you're not using a snapshot version. -->
	<repository>
		<uniqueVersion>false</uniqueVersion>
		<id>geosolutions</id>
		<url>ftp://maven.geo-solutions.it/</url>
	</repository>
	<!-- use the following if you ARE using a snapshot version. -->
	<snapshotRepository>
		<uniqueVersion>false</uniqueVersion>
		<id>geosolutions</id>
		<url>ftp://maven.geo-solutions.it/</url>
	</snapshotRepository>
</distributionManagement>

  <dependencies>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-main</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-epsg-hsql</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-render</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-shapefile</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools.jdbc</groupId>
      <artifactId>gt-jdbc-postgis</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools.jdbc</groupId>
      <artifactId>gt-jdbc-h2</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools.jdbc</groupId>
      <artifactId>gt-jdbc-mysql</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools.jdbc</groupId>
      <artifactId>gt-jdbc-teradata</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-property</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <!--dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-directory</artifactId>
      <version>${gt.version}</version>
    </dependency-->
    <dependency>
      <groupId>org.geotools.xsd</groupId>
      <artifactId>gt-xsd-wfs</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools.xsd</groupId>
      <artifactId>gt-xsd-kml</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-geojson</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-charts</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-swing</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-svg</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-process-geometry</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-process-feature</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-process-raster</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-geotiff</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-image</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-imagemosaic</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-imageio-ext-gdal</artifactId>
      <version>${gt.version}</version>
    </dependency>
    <dependency>
        <groupId>org.geotools</groupId>
        <artifactId>gt-geopkg</artifactId>
        <version>${gt.version}</version>
    </dependency>
    <dependency>
      <groupId>jython</groupId>
      <artifactId>jython</artifactId>
      <version>2.5.2</version>
      <scope>provided</scope>
    </dependency>

    <!--dependency>
      <groupId>org.geotools</groupId>
      <artifactId>gt-geotiff</artifactId>
      <version>${gt.version}</version>
    </dependency-->
  </dependencies>
  
  <build>
    <sourceDirectory>java</sourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}</directory>
        <includes>
          <include>geoscript/**/*.py</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <debug>true</debug>
          <encoding>UTF-8</encoding>
        </configuration>
      </plugin>
      <!--plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
            <configuration>
              <finalName>${artifactId}-java-${version}</finalName>
              <outputDirectory>jars</outputDirectory>
              <excludes>
                <exclude>geoscript/**/*</exclude>
              </excludes>
            </configuration>
          </execution>
        </executions>
      </plugin-->
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <configuration>
          <outputDirectory>${basedir}/jars</outputDirectory>
          <excludeScope>provided</excludeScope>
        </configuration>
        <executions>
          <execution>
            <phase>install</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
       <artifactId>maven-antrun-plugin</artifactId>
       <version>1.8</version>
        <executions>
          <execution>
            <id>initialize</id>
            <phase>initialize</phase>
            <configuration>
              <tasks>
                <mkdir dir="${basedir}/jars"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <execution>
            <id>package-jars</id>
            <phase>package</phase>
            <configuration>
              <tasks>
                <jar destfile="jars/${artifactId}-java-${version}.jar"
                     basedir="target/classes" excludes="geoscript/**/*"/>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
          <execution>
            <id>clean</id>
            <phase>clean</phase>
            <configuration>
              <tasks>
                <delete dir="${basedir}/jars"/> 
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
     </plugin>
    </plugins>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav</artifactId>
        <version>1.0-beta-2</version>
      </extension>
	  <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ftp</artifactId>
                <version>2.10</version>
            </extension>
    </extensions>

  </build>

  <profiles>
    <profile>
      <id>oracle</id>
      <dependencies>
        <dependency>
          <groupId>org.geotools.jdbc</groupId>
          <artifactId>gt-jdbc-oracle</artifactId>
          <version>${gt.version}</version>
        </dependency>
        <dependency>
          <groupId>com.oracle</groupId>
          <artifactId>ojdbc14</artifactId>
          <version>10.2.0.3.0</version>
        </dependency>
      </dependencies>
    </profile>
    <profile>
      <id>spatialite</id>
      <dependencies>
        <dependency>
          <groupId>org.geotools.jdbc</groupId>
          <artifactId>gt-jdbc-spatialite</artifactId>
          <version>${gt.version}</version>
        </dependency>
      </dependencies>
    </profile>
  </profiles>

  <properties>
    <gt.version>21-SNAPSHOT</gt.version>
  </properties>

</project>
