<?xml version="1.0" encoding="UTF-8"?>
<!-- =======================================================================
        Maven Project Configuration File

        The Geotoolkit.org Project
            http://www.geotoolkit.org/

        Profiles available in this build:

          - package      Performs additional packaging process like
                         generating a JAR file for source code and the
                         openoffice add-in (geotk-3.12.oxt file).
          - javadoc-all  Includes the internal classes in the javadoc.
                         This is sometime useful only to Geotk developers,
                         since users should not depend on any internal API.
     ======================================================================= -->
  <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>

  <prerequisites>
    <maven>2.0.9</maven>
  </prerequisites>



  <!-- ==================================================== -->
  <!--     Project description (including license)          -->
  <!-- ==================================================== -->
  <groupId>org.geotoolkit</groupId>
  <artifactId>geotoolkit</artifactId>
  <packaging>pom</packaging>
  <version>3.12</version>
  <name>Geotoolkit.org</name>
  <url>http://www.geotoolkit.org/</url>

  <description>
    Geotoolkit.org (abridged Geotk) is a free software, Java language library for developing
    geospatial applications. The library can be used for desktop or server applications.
  </description>

  <!-- TODO: the information below is used by Maven for generating the copyright
       sentence at the bottom of every page, so we should probably put OSGEO if
       the Geotk project get incubated. Maybe the year should be 2001, which is
       the begining of the legacy SeaGIS project on SourceForge. -->
  <organization>
    <name>Geotoolkit.org</name>
    <url>http://www.geotoolkit.org/</url>
  </organization>
  <inceptionYear>2009</inceptionYear>

  <licenses>
    <license>
      <name>Lesser General Public License (LGPL)</name>
<!--  <url>http://www.gnu.org/copyleft/lesser.txt</url> -->
      <url>http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>



  <!-- =========================================================== -->
  <!--     Issue managements and mailing lists.                    -->
  <!-- =========================================================== -->
  <scm>
    <connection>scm:hg:http://hg.geotoolkit.org/geotoolkit/</connection>
    <url>http://hg.geotoolkit.org/geotoolkit/</url>
  </scm>

  <ciManagement>
    <system>hudson</system>
    <url>http://hudson.geomatys.com/job/Geotoolkit/</url>
  </ciManagement>

  <issueManagement>
    <system>JIRA</system>
    <url>http://jira.geotoolkit.org/</url>
  </issueManagement>

  <mailingLists>
    <mailingList>
      <name>geotoolkit</name>
      <subscribe>http://lists.osgeo.org/mailman/listinfo/geotoolkit</subscribe>
      <unsubscribe>http://lists.osgeo.org/mailman/listinfo/geotoolkit</unsubscribe>
      <post>geotoolkit@lists.osgeo.org</post>
      <archive>http://lists.osgeo.org/pipermail/geotoolkit</archive>
    </mailingList>
  </mailingLists>


  <!-- =========================================================== -->
  <!--     Developers and Contributors                             -->
  <!-- =========================================================== -->
  <developers>
    <developer>
      <name>Martin Desruisseaux</name>
      <id>desruisseaux</id>
      <email>desruisseaux@users.sourceforge.net</email>
      <organization>Geomatys</organization>
      <organizationUrl>http://www.geomatys.fr/</organizationUrl>
      <timezone>+1</timezone>
      <roles>
        <role>Administrator</role>
      </roles>
    </developer>
  </developers>



  <!-- =========================================================== -->
  <!--     Profiles that change the build process. We package the  -->
  <!--     source code only when explicitly requested in order to  -->
  <!--     make daily developer builds faster.                     -->
  <!-- =========================================================== -->
  <profiles>
    <profile>
      <id>package</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>javadoc-all</id>
      <properties>
        <javadoc.exclude>com</javadoc.exclude> <!-- Clears the exclusion list, except the com packages. -->
      </properties>
    </profile>
  </profiles>

  <properties>
    <javadoc.exclude>
      org.geotoolkit.test:org.geotoolkit.demo:org.geotoolkit.maven:org.geotoolkit.openoffice:org.geotoolkit.internal:org.geotoolkit.resources:org.geotoolkit.legacy:org.geotoolkit.metadata.fra:com
    </javadoc.exclude>
    <derby.version>10.5.3.0_1</derby.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!-- TODO: Use <sourceEncoding>UTF-8</sourceEncoding> with Maven 3 -->
  </properties>



  <!-- =========================================================== -->
  <!--     Dependency Management                                   -->
  <!--     If a POM declares one of those dependencies, then it    -->
  <!--     will use the version specified here. Otherwise, those   -->
  <!--     dependencies are ignored.                               -->
  <!--                                                             -->
  <!--     Reference: http://repo1.maven.org/maven2/               -->
  <!-- =========================================================== -->
  <dependencyManagement>
    <dependencies>
      <!-- GeoAPI and its dependencies -->
      <dependency>
        <groupId>org.opengis</groupId>
        <artifactId>geoapi-pending</artifactId>
        <version>2.3-M8</version>
      </dependency>
      <dependency>
        <groupId>org.opengis</groupId>
        <artifactId>conformance</artifactId>
        <version>2.3-M8</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>javax.measure</groupId>
        <artifactId>jsr-275</artifactId>
        <version>0.9.3</version>
      </dependency>
      <!-- Mathematic, geometries, SVG... -->
      <dependency>
        <groupId>java3d</groupId>
        <artifactId>vecmath</artifactId>
        <version>1.5.2</version>
      </dependency>
      <!-- Logging -->
      <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.12</version>  <!-- Same as the dependency in commons-logging -->
      </dependency>
      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.1.1</version>
      </dependency>
      <!--
        NetCDF dependency. If the version is updated, remember to update also the link to javadoc
        later in this pom.xml file, the server/javadoc/links.html file, and the information below.
        Transitive dependencies relevant to Geotk (for dependencies convergence) are:

           slf4j                1.5.6
           commons-logging      1.1    (modified to 1.1.1 in Geotk distribution)
           commons-codec        1.3
           commons-httpclient   3.1
           jdom                 1.1
      -->
      <dependency>
        <groupId>edu.ucar</groupId>
        <artifactId>netcdf</artifactId>
        <version>4.1</version>
      </dependency>
      <!-- Database and Server -->
      <dependency>
        <groupId>org.apache.derby</groupId>
        <artifactId>derby</artifactId>
        <version>${derby.version}</version>
        <scope>provided</scope> <!-- Already included in JDK as JavaDB -->
      </dependency>
      <dependency>
        <groupId>hsqldb</groupId>
        <artifactId>hsqldb</artifactId>
        <version>1.8.0.7</version>
      </dependency>
      <dependency>
        <groupId>postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>8.4-701.jdbc4</version>
      </dependency>
      <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>1.4.1</version>
        <scope>provided</scope> <!-- Already included in JEE -->
      </dependency>
      <!-- GUI -->
      <dependency>
        <groupId>org.swinglabs</groupId>
        <artifactId>swingx</artifactId>
        <version>1.6</version>
      </dependency>
      <dependency>
        <groupId>org.netbeans</groupId>
        <artifactId>wizard</artifactId>
        <version>0.998.1</version>
      </dependency>
      <dependency>
        <groupId>com.sun</groupId>
        <artifactId>jlfgr</artifactId>
        <version>1.0</version>
        <scope>runtime</scope>
      </dependency>
      <!-- Tests or legacy -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.7</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>



  <!-- =========================================================== -->
  <!--     Dependencies to be inherited by all modules.            -->
  <!-- =========================================================== -->
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>



  <!-- ======================================================= -->
  <!--     Build setting.                                      -->
  <!-- ======================================================= -->
  <!-- sourceEncoding>UTF-8</sourceEncoding -->
  <build>
    <plugins>
      <!-- ======================================================= -->
      <!--     Compilation.                                        -->
      <!--                                                         -->
      <!-- Note: experimentation suggests that <debug>false</..>   -->
      <!-- is equivalent to <compilerArgument>-g:source,lines</..> -->
      <!-- which is what we actually want.                         -->
      <!-- ======================================================= -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>       <!-- The -source argument for the Java compiler.   -->
          <target>1.6</target>       <!-- The -target argument for the Java compiler.   -->
          <debug>false</debug>       <!-- Whether to include debugging information.     -->
          <optimize>true</optimize>  <!-- Whether to optimize the compiled code.        -->
          <encoding>UTF-8</encoding> <!-- The -encoding argument for the Java compiler. -->
          <showWarnings>true</showWarnings>
          <maxmem>512M</maxmem>
        </configuration>
      </plugin>

      <!-- ======================================================= -->
      <!--     Resources.                                          -->
      <!-- ======================================================= -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
          <nonFilteredFileExtensions>
            <nonFilteredFileExtension>utf</nonFilteredFileExtension>
            <nonFilteredFileExtension>tif</nonFilteredFileExtension>
            <nonFilteredFileExtension>tiff</nonFilteredFileExtension>
            <nonFilteredFileExtension>serialized</nonFilteredFileExtension>
          </nonFilteredFileExtensions>
        </configuration>
      </plugin>

      <!-- ======================================================= -->
      <!--     JAR packaging.                                      -->
      <!-- ======================================================= -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <forced>false</forced>   <!-- Recreate the archive only if needed.     -->
            <index>true</index>      <!-- Archive will contain an INDEX.LIST file. -->
            <manifest>
              <addClasspath>true</addClasspath>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
          </archive>
        </configuration>
      </plugin>

      <!-- ======================================================= -->
      <!--     Tests.                                              -->
      <!-- ======================================================= -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <argLine>-Xmx512M</argLine>
        </configuration>
      </plugin>

      <!-- ======================================================= -->
      <!--     Dashboard report.                                   -->
      <!-- ======================================================= -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dashboard-maven-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1</version>
          </dependency>
        </dependencies>
      </plugin>
    </plugins>

    <!-- ======================================================= -->
    <!--     Required extension for deployment.                  -->
    <!-- ======================================================= -->
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav</artifactId>
        <version>1.0-beta-2</version>
      </extension>
    </extensions>
  </build>



  <reporting>
    <plugins>
      <!-- ======================================================= -->
      <!--     Web site generation.                                -->
      <!-- ======================================================= -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <configuration>
          <locales>en</locales>
          <inputEncoding>UTF-8</inputEncoding>
          <outputEncoding>UTF-8</outputEncoding>
        </configuration>
      </plugin>

      <!-- ======================================================= -->
      <!--     Reports configuration for the web site.             -->
      <!-- ======================================================= -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.1</version> <!-- Version 2.2 doesn't work. See http://www.mail-archive.com/users@maven.apache.org/msg109241.html -->
      </plugin>

      <!-- ==================================================== -->
      <!--     JUnit test results                               -->
      <!-- ==================================================== -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
      </plugin>

      <!-- ==================================================== -->
      <!--     Dashboard reports                                -->
      <!-- ==================================================== -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dashboard-maven-plugin</artifactId>
      </plugin>

      <!-- ======================================================= -->
      <!--     Javadoc generation.                                 -->
      <!-- ======================================================= -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>javadoc</report>     <!-- We want API javadoc only, not tests javadoc. -->
            </reports>
          </reportSet>
        </reportSets>
        <configuration>
          <source>1.6</source>             <!-- Enables javadoc to handle assertions present in J2SE 1.4.  -->
          <encoding>UTF-8</encoding>       <!-- The encoding of the source files.                          -->
          <docencoding>UTF-8</docencoding> <!-- The encoding of the generated HTML files.                  -->
          <charset>UTF-8</charset>         <!-- Specifies the HTML character set for this document.        -->
          <locale>en</locale>              <!-- Locale that javadoc uses when generating documentation.    -->
          <noqualifier>all</noqualifier>   <!-- Omit qualifying package name before class names in output. -->
          <aggregate>true</aggregate>      <!-- Build an aggregated report at the root.                    -->
          <maxmemory>512M</maxmemory>      <!-- maximum Java heap size to be used when launching the tool. -->
          <quiet>true</quiet>              <!-- Shuts off non-error and non-warning messages.              -->
          <keywords>true</keywords>        <!-- Adds HTML meta keyword tags to the generated files.        -->
          <breakiterator>true</breakiterator>
          <excludePackageNames>${javadoc.exclude}</excludePackageNames>

          <!-- Custom taglets implemented in Java. -->
          <taglets>
            <taglet><tagletClass>org.geotoolkit.maven.taglet.Module</tagletClass></taglet>
            <taglet><tagletClass>org.geotoolkit.maven.taglet.Section</tagletClass></taglet>
            <taglet><tagletClass>org.geotoolkit.maven.taglet.Note</tagletClass></taglet>
            <taglet><tagletClass>org.geotoolkit.maven.taglet.Preformat</tagletClass></taglet>
          </taglets>
          <tagletArtifact>
            <groupId>org.geotoolkit.project</groupId>
            <artifactId>geotk-javadoc</artifactId>
            <version>${project.version}</version>
          </tagletArtifact>

          <!-- Creates links to existing javadoc-generated   -->
          <!-- documentation of external referenced classes. -->
          <links>
            <link>http://java.sun.com/javase/6/docs/api</link>
            <link>http://download.java.net/media/jai/javadoc/1.1.3/jai-apidocs</link>
            <link>http://download.java.net/media/jai-imageio/javadoc/1.1</link>
            <link>http://download.java.net/media/java3d/javadoc/1.5.1</link>
            <link>http://www.unidata.ucar.edu/software/netcdf-java/v4.1/javadoc</link>
       <!-- <link>http://swinglabs.org/hudson/job/SwingX%20Continuous%20Build/javadoc</link> -->
            <link>http://javadoc.geotoolkit.org/external/swingx</link>
            <link>http://jscience.org/api/</link>
            <link>http://www.geoapi.org/snapshot/pending</link>
          </links>

          <!-- Separates packages on the overview page into the groups specified. -->
          <groups>
            <group>
              <title>Geometry</title>
              <packages>
                org.geotoolkit.geometry*:org.geotoolkit.topology*
              </packages>
            </group>
            <group>
              <title>Feature and filter</title>
              <packages>
                org.geotoolkit.storage*
              </packages>
            </group>
            <group>
              <title>Coverage and Raster</title>
              <packages>
                org.geotoolkit.coverage*:org.geotoolkit.image*
              </packages>
            </group>
            <group>
              <title>Referencing</title>
              <packages>
                org.geotoolkit.referencing*:org.geotoolkit.parameter*
              </packages>
            </group>
            <group>
              <title>Metadata</title>
              <packages>org.geotoolkit.metadata*:org.geotoolkit.naming*</packages>
            </group>
            <group>
              <title>Input/Output (except Raster)</title>
              <packages>
                org.geotoolkit.console*:org.geotoolkit.io*:org.geotoolkit.sql*:org.geotoolkit.xml*
              </packages>
            </group>
            <group>
              <title>Utilities</title>
              <packages>
                org.geotoolkit.factory*:org.geotoolkit.index*:org.geotoolkit.lang*:org.geotoolkit.math*:org.geotoolkit.measure*:org.geotoolkit.nature*:org.geotoolkit.util*
              </packages>
            </group>
            <group>
              <title>Display</title>
              <packages>
                org.geotoolkit.display*:org.geotoolkit.gui*
              </packages>
            </group>
          </groups>

          <!-- Enables the Javadoc tool to interpret a simple, one-argument -->
          <!-- custom block tag tagname in doc comments. Note: <placement/> -->
          <!-- should be a combinaison of the letters Xaoptcmf.             -->
          <tags>
            <!-- Maven tags -->
            <tag>
              <name>goal</name>
              <placement>t</placement>
              <head>Maven goal:</head>
            </tag>
            <tag>
              <name>phase</name>
              <placement>t</placement>
              <head>Maven phase:</head>
            </tag>
            <tag>
              <name>description</name>
              <placement>t</placement>
              <head>Description:</head>
            </tag>
            <!-- Geotk tags -->
            <tag>
              <name>level</name>
              <placement>X</placement>
              <head>API level:</head> <!-- Use "basic", "advanced", "internal", "hidden". -->
            </tag>
            <tag>
              <name>category</name>
              <placement>X</placement>
              <head>Category:</head>
            </tag>
            <tag>
              <name>todo</name>
              <placement>a</placement>
              <head>TODO:</head>
            </tag>
          </tags>
        </configuration>
      </plugin>

      <!-- ==================================================== -->
      <!--     TODO tags                                        -->
      <!-- ==================================================== -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>taglist-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </reporting>



  <!-- ================================================================== -->
  <!--     Repositories. This is where Maven looks for dependencies. The  -->
  <!--     Maven repository is implicit and doesn't need to be specified. -->
  <!-- ================================================================== -->
  <repositories>
    <repository>
      <id>maven2-repository.dev.java.net</id>
      <name>Java.net repository</name>
      <url>http://download.java.net/maven/2</url>
    </repository>
    <repository>
      <id>geotoolkit</id>
      <name>Geotoolkit repository</name>
      <url>http://maven.geotoolkit.org</url>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>geotoolkit</id>
      <name>Geotoolkit repository</name>
      <url>http://maven.geotoolkit.org</url>
    </pluginRepository>
  </pluginRepositories>



  <!-- ==================================================== -->
  <!--     Deployment to public servers                     -->
  <!-- ==================================================== -->
  <distributionManagement>
    <site>
      <id>geotoolkit</id>
      <name>Geotoolkit web site</name>
      <url>dav:http://www.geotoolkit.org/</url>
    </site>
    <repository>
       <id>geotoolkit</id>
       <name>Geotoolkit binaries</name>
       <url>dav:http://maven.geotoolkit.org/</url>
       <uniqueVersion>false</uniqueVersion>
    </repository>
  </distributionManagement>



  <!-- =========================================================== -->
  <!--     Modules for the build in approximate dependency order   -->
  <!-- =========================================================== -->
  <modules>
    <module>build</module>
    <module>modules</module>
    <module>demos</module>
  </modules>
</project>

