<?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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>
  <groupId>co.jirm</groupId>
  <artifactId>jirm-parent</artifactId>
  <version>0.0.8</version>
  <packaging>pom</packaging>

  <name>jirm</name>
  <description>Java Immutable object Relational Mapper is a unique Java SQL ORM that allows you to CRUD immutable objects.</description>

  <url>https://github.com/agentgt/jirm</url>

  <modules>
    <module>jirm-core</module>
    <module>jirm-orm</module>
    <module>jirm-spring</module>
  </modules>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <comments>
            This product includes software developed by Adam Gent (http://adamgent.com).
      </comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>agentgt</id>
      <name>Adam Gent</name>
      <url>https://github.com/agentgt</url>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:agentgt/jirm.git</connection>
    <developerConnection>scm:git:git@github.com:agentgt/jirm.git</developerConnection>
    <url>scm:git:git@github.com:agentgt/jirm.git</url>
    <tag>jirm-parent-0.0.8</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots</id>
      <name>Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </snapshotRepository>
    <repository>
      <id>sonatype-nexus-staging</id>
      <name>Nexus Release Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
  </distributionManagement>

  <dependencyManagement>
    <dependencies>



      <!-- Logging System -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.6.4</version>
      </dependency>


      <!-- Jackson 1.x -->
      <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>${jackson-version}</version>
      </dependency>

      <!-- Jackson 2.x -->
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${jackson2-version}</version>
      </dependency>


      <!-- Test dependencies -->
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.0.3</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>test</scope>
        <version>4.10</version>
      </dependency>



      <dependency>
      	<groupId>com.google.guava</groupId>
      	<artifactId>guava</artifactId>
      	<version>11.0.2</version>
      </dependency>

	<dependency>
		<groupId>joda-time</groupId>
		<artifactId>joda-time</artifactId>
		<version>2.1</version>
	</dependency>
        
    </dependencies>
    
  </dependencyManagement>

  <build>
    <plugins>
      <!-- We're on 1.6 -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <!-- sure-fire -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12</version>
        <configuration>
          <excludes>
            <exclude>**/*BenchTest.java</exclude>
          </excludes>
        </configuration>
      </plugin>

      <!-- Eclipse setup -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-eclipse-plugin</artifactId>
        <version>2.9</version>
        <configuration>
          <downloadSources>true</downloadSources>
        </configuration>
      </plugin>

      <plugin>
        <groupId>com.mycila.maven-license-plugin</groupId>
        <artifactId>maven-license-plugin</artifactId>
        <version>1.10.b1</version>
		<configuration>
			<header>src/etc/header.txt</header>
			<quiet>false</quiet>
			<failIfMissing>true</failIfMissing>
			<aggregate>false</aggregate>
			<strictCheck>true</strictCheck>
			<includes>
				<include>src/main/java/**/*.java</include>
				<include>src/test/java/**/*.java</include>
			</includes>
            <properties>
                <name>the original author or authors</name>
                <year>2012</year>
            </properties>
            <encoding>UTF-8</encoding>
		</configuration>
        <executions>
          <execution>
            <phase>verify</phase>
            <goals>
              <goal>format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- Release plugin -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.3.2</version>
        <configuration>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <useReleaseProfile>false</useReleaseProfile>
          <arguments>-Psonatype-oss-release</arguments>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>

    <profile>
      <id>sonatype-oss-release</id>
      <build>
        <plugins>
          <!-- Source -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.1.2</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- Javadoc -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.8.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <!-- GPG -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    
    <profile>
    	<id>travis</id>
    	<activation>
    		<property>
    			<name>env.TRAVIS</name>
    			<value>true</value>
    		</property>
    	</activation>
    	<build>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>2.12</version>
					<configuration>
						<systemPropertyVariables>
							<database.url>jdbc:postgresql://127.0.0.1:5432/myapp_test</database.url>
							<database.password />
						</systemPropertyVariables>
					</configuration>
				</plugin>
			</plugins>
		</build>
    </profile>
    
  </profiles>

  <prerequisites>
    <maven>3.0</maven>
  </prerequisites>

  <properties>
    <!-- Encoding UTF-8 -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <jackson2-version>2.0.5</jackson2-version>
    <jackson-version>1.9.9</jackson-version>
  </properties>
</project>
