<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>
  
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <groupId>com.spatial4j</groupId>
  <artifactId>spatial4j-parent</artifactId>
  <version>0.2</version>
  <packaging>pom</packaging>
  <name>spatial4j-parent</name>
  <description>
   Java Spatial Library (Parent POM)
  </description>

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

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
  	<connection>scm:git:git@github.com:spatial4j/spatial4j.git</connection>
    <developerConnection>scm:git:git@github.com:spatial4j/spatial4j.git</developerConnection>
    <url>git@github.com:spatial4j/spatial4j.git</url>
  </scm>

  <developers>
    <developer>
      <name>Ryan McKinley</name>
      <email>ryantxu@gmail.com</email>
    </developer>
    <developer>
      <name>David Smiley</name>
      <email>dsmiley@apache.org</email>
    </developer>
    <developer>
      <name>Chris Male</name>
      <email>gento0nz@gmail.com</email>
    </developer>
  </developers>

  <properties>
    <!-- this magic system property is honored by many plugins: http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <!-- TODO do we really buy anything by putting these here instead of in maven-compiler-plugin ? -->
    <maven.compile.source>1.6</maven.compile.source>
    <maven.compile.target>1.6</maven.compile.target>
    <maven.compile.optimize>true</maven.compile.optimize>
    <maven.compile.deprecation>true</maven.compile.deprecation>
    
    <wicket.version>1.4.17</wicket.version>
    <jetty.version>6.1.25</jetty.version>
    <slf4j.version>1.6.1</slf4j.version>
    <lucene.version>4.0-SNAPSHOT</lucene.version>
    <jts.version>1.12</jts.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!-- v4.10 is what Lucene uses; good to keep in sync -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.10</version>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <!-- inherited by all modules -->
  <dependencies>

    <!-- TESTING -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>${slf4j.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <finalName>${project.artifactId}-${project.version}</finalName>
  
    <plugins>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>${maven.compile.source}</source>
          <target>${maven.compile.target}</target>
          <optimize>${maven.compile.optimize}</optimize>
          <showDeprecation>${maven.compile.deprecation}</showDeprecation>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <systemPropertyVariables>
            <!-- taken from Lucene's pom -->
            <jetty.testMode>1</jetty.testMode>
            <tests.verbose>${tests.verbose}</tests.verbose>
            <tests.codec>${tests.codec}</tests.codec>
            <tests.directory>${tests.directory}</tests.directory>
            <tests.iter>${tests.iter}</tests.iter>
            <tests.locale>${tests.locale}</tests.locale>
            <tests.luceneMatchVersion>${tests.luceneMatchVersion}</tests.luceneMatchVersion>
            <tests.multiplier>${tests.multiplier}</tests.multiplier>
            <tests.nightly>${tests.nightly}</tests.nightly>
            <tests.seed>${tests.seed}</tests.seed>
            <tests.timezone>${tests.timezone}</tests.timezone>
          </systemPropertyVariables>
        </configuration>
      </plugin>

    </plugins>  
  </build>

  <reporting>
    <!-- TODO support maven 3  (& 2?)-->
    <plugins>
    
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-pmd-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <linkXRef>true</linkXRef>
          <minimumTokens>100</minimumTokens>
          <targetJdk>1.6</targetJdk>
          <!--
          <excludes>
            <exclude>**/*Bean.java</exclude>
            <exclude>**/generated/*.java</exclude>
          </excludes>
          <excludeRoots>
            <excludeRoot>target/generated-sources/stubs</excludeRoot>
          </excludeRoots>
          -->
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <!--<findbugsXmlOutput>true</findbugsXmlOutput> deprecated-->
          <findbugsXmlWithMessages>true</findbugsXmlWithMessages>
          <xmlOutput>true</xmlOutput>
        </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jxr-plugin</artifactId>
        <version>2.2</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.7.2</version>
      </plugin>

      <plugin>
        <inherited>true</inherited>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <maxmemory>1024m</maxmemory>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <downloadSources>true</downloadSources>
        </configuration>
      </plugin>

    </plugins>
  </reporting>

  <!-- note: repositories default: releases=true, snapshots=false -->

  <profiles>
    <profile>
      <id>updateLucene</id>
      <repositories>
        <!-- for Lucene -->
        <repository>
          <id>org.apache.snapshots</id>
          <name>Apache Snapshot Repository</name>
          <url>http://repository.apache.org/snapshots</url>
          <layout>default</layout>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>

  </profiles>

  <modules>
    <module>spatial4j-core</module>
    <module>lucene-spatial-module</module>
    <module>spatial4j-solr</module>
    <module>spatial4j-demo</module>
  </modules>
  
</project>
