<?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>org.aksw.commons</groupId>
    <artifactId>aksw-commons-parent</artifactId>
    <packaging>pom</packaging>
    <version>0.7.7</version>
    <name>AKSW Commons parent</name>

    <scm>
 <!--       <connection>scm:hg:https://aksw-commons.googlecode.com/hg/</connection> -->
        <connection>scm:git:git@github.com:AKSW/aksw-commons.git</connection>
        <tag>aksw-commons-parent-0.7.7</tag>
    </scm>

    <properties>
        <!--  tell the compiler we can use 1.6 -->
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <junit.version>4.8.1</junit.version>
        <slf4j.version>1.6.0</slf4j.version>
    </properties>

    <modules>
        <module>aksw-commons-collections</module>
        <module>aksw-commons-util</module>
    </modules>

    <build>
        <plugins>
            <!-- That's a sledge hammer solution - but at least it works ... -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <arguments>-P!source-artifacts</arguments>
                    <useReleaseProfile>false</useReleaseProfile>
                    <goals>-Dmaven.test.skip=true deploy</goals>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                </configuration>
            </plugin>


            <!--Maven Compiler Plugin -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>


            <!-- Solution from http://stackoverflow.com/questions/4725668/how-to-deploy-snapshot-with-sources-and-javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <failOnError>false</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.18.1</version>
                <configuration>
                    <skipTests>true</skipTests>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>

            <dependency>
                <groupId>org.aksw.commons</groupId>
                <artifactId>aksw-commons-collections</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.aksw.commons</groupId>
                <artifactId>aksw-commons-util</artifactId>
                <version>${project.version}</version>
            </dependency>

            <dependency>
                <groupId>org.aksw.commons</groupId>
                <artifactId>aksw-commons-sparql</artifactId>
                <version>${project.version}</version>
            </dependency>

            <!--Junits-->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.7</version>
                <scope>test</scope>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-ext</artifactId>
                <version>${slf4j.version}</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <!-- Usually we depend on slf4j, but for testing we depend on a concrete implementation -->
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.16</version>
                <scope>test</scope>
            </dependency>

            <!-- Used for SQL-Escapting (StringEscapeUtils) -->
            <dependency>
                <groupId>commons-lang</groupId>
                <artifactId>commons-lang</artifactId>
                <version>2.4</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>com.thoughtworks.xstream</groupId>
                <artifactId>xstream</artifactId>
                <version>1.3.1</version>
                <type>jar</type>
                <scope>compile</scope>
            </dependency>

            <dependency>
                <groupId>net.sourceforge.collections</groupId>
                <artifactId>collections-generic</artifactId>
                <version>4.01</version>
            </dependency>

            <!-- Collection APIs -->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>18.0</version>
            </dependency>

            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-compress</artifactId>
                <version>1.4.1</version>
            </dependency>

        </dependencies>
    </dependencyManagement>

    <distributionManagement>
        <repository>
            <id>maven.aksw.internal</id>
            <name>AKSW Internal Release Repository</name>
            <url>http://maven.aksw.org/archiva/repository/internal</url>
        </repository>
        <snapshotRepository>
            <id>maven.aksw.snapshots</id>
            <name>AKSW Snapshot Repository</name>
            <url>http://maven.aksw.org/archiva/repository/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

</project>
