<?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>
  <groupId>com.datomic</groupId>
  <artifactId>simulant</artifactId>
  <packaging>jar</packaging>
  <version>0.1.8</version>
  <name>simulant</name>
  <description>Simulation testing with Datomic</description>
  <url>https://github.com/Datomic/simulant</url>
  <licenses>
    <license>
      <name>Eclipse Public License - v 1.0</name>
      <url>http://www.eclipse.org/legal/epl-v10.html</url>
      <distribution>repo</distribution>
      <comments>same as Clojure</comments>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Stuart Halloway</name>
      <email>stu@datomic.com</email>
      <timezone>-5</timezone>
    </developer>
    <developer>
      <name>Rich Hickey</name>
      <email>richhickey@gmail.com</email>
      <timezone>-5</timezone>
    </developer>
  </developers>

  <organization>
    <name>Metadata Partners, LLC</name>
    <url>http://www.metadatapartners.com/</url>
  </organization>

  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>

  <properties>
    <!-- Builds will use this release version of Clojure, may be
         overridden in projects or at the command line. -->
    <clojure.version>1.4.0</clojure.version>
    <!-- By default, do not enable *warn-on-reflection*, may be
         overridden in projects at the command line. -->
    <clojure.warnOnReflection>false</clojure.warnOnReflection>

    <clojure.source.dir>src/</clojure.source.dir>
    <clojure.testSource.dir>test/</clojure.testSource.dir>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <scm>
    <connection>scm:git:git://github.com/Datomic/simulant.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/Datomic/simulant.git</developerConnection>
    <url>https://github.com/Datomic/simulant</url>
    <tag>simulant-0.1.8</tag>
  </scm>

  <distributionManagement>
    <snapshotRepository>
      <id>sonatype-nexus-snapshots-datomic</id>
      <name>Sonatype Nexus Snapshots for Datomic</name>
      <url>${sonatypeOssDistMgmtSnapshotsUrl}</url>
    </snapshotRepository>
  </distributionManagement>

  <dependencies>
    <dependency>
      <groupId>org.clojure</groupId>
      <artifactId>clojure</artifactId>
      <version>1.5.1</version>
    </dependency>
    <dependency>
      <groupId>org.clojure</groupId>
      <artifactId>test.generative</artifactId>
      <version>0.5.0</version>
    </dependency>
    <dependency>
      <groupId>com.datomic</groupId>
      <artifactId>datomic-free</artifactId>
      <version>0.9.4556</version>
      <exclusions>
        <exclusion>
          <groupId>org.clojure</groupId>
          <artifactId>clojure</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>resources</directory>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <!-- Add Clojure sources to the project's source directories -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.5</version>
        <executions>
          <execution>
            <id>add-clojure-source-dirs</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
              <goal>add-resource</goal>
            </goals>
            <configuration>
              <sources>
                <source>${clojure.source.dir}</source>
              </sources>
              <resources>
                <resource>
                  <directory>${clojure.source.dir}</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
          <execution>
            <id>add-clojure-test-source-dirs</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-test-source</goal>
              <goal>add-test-resource</goal>
            </goals>
            <configuration>
              <sources>
                <source>${clojure.testSource.dir}</source>
              </sources>
              <resources>
                <resource>
                  <directory>${clojure.testSource.dir}</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <!-- By default, compile everything as a sanity check, but do
             not include any AOT-compiled .class files in the
             JAR. Projects may override as needed. -->
        <groupId>com.theoryinpractise</groupId>
        <artifactId>clojure-maven-plugin</artifactId>
        <version>1.3.13</version>
        <extensions>true</extensions>
        <configuration>
          <warnOnReflection>${clojure.warnOnReflection}</warnOnReflection>
          <temporaryOutputDirectory>true</temporaryOutputDirectory>
        </configuration>
        <executions>
          <execution>
            <id>clojure-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>clojure-test</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
          <encoding>${project.build.sourceEncoding}</encoding>
        </configuration>
      </plugin>
      <plugin>
        <!-- do not push pre-deployment SCM changes to upstream repo
             with maven release plugin; if the release/deploy fails,
             we're stuck with manually fixing up version numbers, git
             history, etc -->
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
          <pushChanges>false</pushChanges>
          <localCheckout>true</localCheckout>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <!-- Permit compiling/testing any contrib project with a
       locally-built Clojure by running
       "mvn -Dclojure.jar=/path/to/some/local/clojure.jar" -->
  <profiles>
    <profile>
      <id>sonatype-oss-release</id>
      <!-- This profile is enabled automatically by the Sonatype
           oss-parent POM when invoking the Maven Release Plugin -->
      <dependencies>
        <!-- Copy default Clojure dependency here, because enabling
             the sonatype-oss-release profile will disable the default
             proile. -->
        <dependency>
          <groupId>org.clojure</groupId>
          <artifactId>clojure</artifactId>
          <version>${clojure.version}</version>
        </dependency>
      </dependencies>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-deploy-plugin</artifactId>
            <configuration>
              <skip>true</skip>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.4.4</version>
            <executions>
              <execution>
                <id>default-deploy</id>
                <phase>deploy</phase>
                <!-- By default, this is the phase deploy goal will bind to -->
                <goals>
                  <goal>deploy</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <!-- The Base URL of Nexus instance where we want to stage -->
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
              <!-- The server "id" element from settings to use authentication from -->
              <serverId>sonatype-nexus-staging-datomic</serverId>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.4</version>
            <configuration>
              <keyname>Datomic</keyname>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <repositories>
    <repository>
      <id>central</id>
      <url>http://repo1.maven.org/maven2/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
    <repository>
      <id>clojars</id>
      <url>https://clojars.org/repo/</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
      </releases>
    </repository>
  </repositories>

</project>
