<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>io.alphatier</groupId>
    <artifactId>alphatier-java</artifactId>
    <version>0.1.0</version>

    <name>Alphatier (Java version)</name>
    <url>http://alphatier.io/</url>
    <description>
        Alphatier is a resource management library. It is designed to allow different schedulers to share the
        resources of a pool of executors in order to execute tasks with those.
    </description>

    <licenses>
        <license>
            <name>ISC License</name>
            <url>http://opensource.org/licenses/ISC</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git://github.com/sarnowski/alphatier-java.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/sarnowski/alphatier-java.git</developerConnection>
        <url>https://github.com/sarnowski/alphatier-java</url>
      <tag>0.1.0</tag>
  </scm>

    <developers>
        <developer>
            <name>Tobias Sarnowski</name>
            <url>http://www.sarnowski.io</url>
            <email>tobias@sarnowski.io</email>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.javadoc.skip>true</maven.javadoc.skip>
    </properties>

    <dependencies>
        <dependency>
            <groupId>io.alphatier</groupId>
            <artifactId>alphatier</artifactId>
            <version>0.1.0</version>
        </dependency>

        <dependency>
            <groupId>org.clojure</groupId>
            <artifactId>core.memoize</artifactId>
            <version>0.5.6</version>
        </dependency>

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

        <!-- required here for generating autodoc -->
        <dependency>
            <groupId>autodoc</groupId>
            <artifactId>autodoc</artifactId>
            <version>0.9.0</version>
            <scope>compile</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <!-- java 6 -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <fork>true</fork>
                    <verbose>true</verbose>
                    <compilerVersion>1.6</compilerVersion>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <!-- clojure -->
            <plugin>
                <groupId>com.theoryinpractise</groupId>
                <artifactId>clojure-maven-plugin</artifactId>
                <version>1.3.20</version>
                <executions>
                    <execution>
                        <id>aot</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>sources-and-docs</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>autodoc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <!-- sources and javadoc generation -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.3</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.5</version>
                        <executions>
                            <execution>
                                <id>autodoc-javadoc-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <classifier>javadoc</classifier>
                                    <classesDirectory>${project.build.directory}/autodoc</classesDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- release signing -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>tobias@sarnowski.io</keyname>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>clojars.org</id>
            <url>http://clojars.org/repo</url>
        </repository>
    </repositories>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>
