<?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>
    <artifactId>sesamestream-impl</artifactId>
    <version>1.0</version>
    <packaging>jar</packaging>
    <name>SesameStream Implementation</name>

    <parent>
        <groupId>edu.rpi.twc.sesamestream</groupId>
        <artifactId>sesamestream-all</artifactId>
        <version>1.0</version>
    </parent>

    <properties>
        <!-- Note: this is overridden in the integration-test profile -->
        <srcdir>src/test/java</srcdir>
    </properties>

    <dependencies>
        <dependency>
            <groupId>edu.rpi.twc.sesamestream</groupId>
            <artifactId>sesamestream-api</artifactId>
            <version>${sesamestream.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-queryparser-sparql</artifactId>
            <version>${sesame.version}</version>
        </dependency>
        <!-- temporary; necessary because linked-data-sail depends on multiple versions of this module -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.3.1</version>
        </dependency>
        <dependency>
            <groupId>net.fortytwo</groupId>
            <artifactId>linked-data-sail</artifactId>
            <version>${ripple.version}</version>
            <exclusions>
                <!-- temporary conflict; as of 1.2-SNAPSHOT, Ripple does not have its own slf4j dependencies -->
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
                <!-- temporary conflict; as of 1.2-SNAPSHOT, Ripple enforces consistency w.r.t. Sesame dependencies -->
                <exclusion>
                    <groupId>org.openrdf.sesame</groupId>
                    <artifactId>sesame-model</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.openrdf.sesame</groupId>
                    <artifactId>sesame-rio-api</artifactId>
                </exclusion>
                <!-- temporary; see dependency above -->
                <exclusion>
                    <groupId>com.fasterxml.jackson.core</groupId>
                    <artifactId>jackson-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.fortytwo.sesametools</groupId>
            <artifactId>common</artifactId>
            <version>${sesametools.version}</version>
            <exclusions>
                <!-- temporary conflict; as of 1.9-SNAPSHOT, SesameTools does not have its own slf4j dependencies -->
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-rio-ntriples</artifactId>
            <version>${sesame.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-rio-nquads</artifactId>
            <version>${sesame.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.openrdf.sesame</groupId>
            <artifactId>sesame-sail-memory</artifactId>
            <version>${sesame.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <sourceDirectory>src/main/java</sourceDirectory>
        <testSourceDirectory>${srcdir}</testSourceDirectory>
        <directory>target</directory>
        <finalName>${project.artifactId}-${project.version}</finalName>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <id>copy-dependencies</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.12</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.1.2</version>
                <executions>
                    <execution>
                        <id>attach-source</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.8.1</version>
                <executions>
                    <execution>
                        <id>attach-javadoc</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>aggregate</id>
                        <goals>
                            <goal>aggregate</goal>
                        </goals>
                        <phase>site</phase>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <!-- This profile can be activated in order to run integration tests, e.g. `mvn clean test -Pintegration-test` -->
        <profile>
            <id>integration-test</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <properties>
                <srcdir>src/integration/java</srcdir>
            </properties>
        </profile>
    </profiles>

</project>
