<?xml version="1.0"?>
<!--
  ~ Copyright (c) 2013. Knowledge Media Institute - The Open University
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<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>
    <parent>
        <artifactId>iserve-parent</artifactId>
        <groupId>uk.ac.open.kmi.iserve</groupId>
        <version>2.0.0-RC3</version>
    </parent>
    <artifactId>iserve-semantic-discovery</artifactId>
    <name>iServe Semantic Discovery Plug-in</name>
    <description>
        iServe Semantic Discovery provides a default implementation of discovery plugins exploiting
        logic-based discovery.
    </description>

    <developers>
        <developer>
            <id>cpedrinaci</id>
            <name>Carlos Pedrinaci</name>
            <email>c.pedrinaci-{AT}-open.ac.uk</email>
            <url>http://people.kmi.open.ac.uk/carlos/</url>
            <organization>Knowledge Media Institute - The Open University</organization>
            <organizationUrl>http://kmi.open.ac.uk</organizationUrl>
        </developer>
        <developer>
            <id>dong</id>
            <name>Dong Liu</name>
            <email>d.liu-{AT}-open.ac.uk</email>
            <organization>Knowledge Media Institute - The Open University</organization>
            <organizationUrl>http://kmi.open.ac.uk</organizationUrl>
        </developer>
        <developer>
            <id>jkopecky</id>
            <name>Jacek Kopecky</name>
            <email>j.kopecky-{AT}-open.ac.uk</email>
            <organization>Knowledge Media Institute - The Open University</organization>
            <organizationUrl>http://kmi.open.ac.uk</organizationUrl>
        </developer>
        <developer>
            <id>pablo</id>
            <name>Pablo Rodriguez Mier</name>
            <email>pablo.rodriguez.mier-{AT}-usc.es</email>
            <organization>CITIUS - Universidad de Santiago de Compostela</organization>
            <organizationUrl>http://citius.usc.es</organizationUrl>
        </developer>
    </developers>
    <organization>
        <name>Knowledge Media Institute - The Open University</name>
        <url>http://kmi.open.ac.uk</url>
    </organization>

    <dependencies>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>${httpclient.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.1</version>
            <type>jar</type>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>uk.ac.open.kmi.msm4j</groupId>
            <artifactId>msm4j-vocabulary</artifactId>
            <version>${msm4j.version}</version>
        </dependency>
        <dependency>
            <groupId>uk.ac.open.kmi.msm4j</groupId>
            <artifactId>msm4j-io</artifactId>
            <version>${msm4j.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.parent.groupId}</groupId>
            <artifactId>iserve-sal-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.parent.groupId}</groupId>
            <artifactId>iserve-discovery-api</artifactId>
            <version>${project.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>slf4j-jdk14</artifactId>
                    <groupId>org.slf4j</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>${guava.version}</version>
        </dependency>
        <!-- Add dependency to jsr305 as necessary Guava predicates -->
        <dependency>
            <groupId>com.google.code.findbugs</groupId>
            <artifactId>jsr305</artifactId>
            <version>2.0.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>apache-jena-libs</artifactId>
            <version>${jena.version}</version>
            <type>pom</type>
        </dependency>

        <!-- For testing of REST services. Place before JUnit-->
        <dependency>
            <groupId>com.jayway.restassured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>1.8.1</version>
            <exclusions>
                <!-- Exclude Groovy because of classpath issue -->
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy</artifactId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>

        <!-- Include dependency on Jukito to have configured test cases with Guice injection -->
        <dependency>
            <groupId>org.jukito</groupId>
            <artifactId>jukito</artifactId>
            <version>1.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <!-- Needs to be the same version that REST Assured depends on -->
            <version>2.1.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>uk.ac.open.kmi.msm4j</groupId>
            <artifactId>msm4j-wsc-transformer</artifactId>
            <version>${msm4j.version}</version>
            <scope>test</scope>
        </dependency>

        <!-- Include Test Resources -->
        <dependency>
            <groupId>uk.ac.open.kmi.test-collections</groupId>
            <artifactId>sws-test-collections</artifactId>
            <version>${test-collections.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>javax.ws.rs-api</artifactId>
            <version>2.0</version>
        </dependency>
    </dependencies>


    <build>
        <plugins>
            <!--Obtain shared resources-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-remote-resources-plugin</artifactId>
                <version>1.4</version>
                <executions>
                    <!--Test resources-->
                    <execution>
                        <id>load-test-resources</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>process</goal>
                        </goals>
                        <configuration>
                            <resourceBundles>
                                <resourceBundle>
                                    uk.ac.open.kmi.test-collections:sws-test-collections:${test-collections.version}
                                </resourceBundle>
                            </resourceBundles>
                            <attached>false</attached>
                            <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- Generate the META-INF/services information for ServiceLoader -->
            <plugin>
                <groupId>eu.somatik.serviceloader-maven-plugin</groupId>
                <artifactId>serviceloader-maven-plugin</artifactId>
                <version>1.0.2</version>
                <configuration>
                    <services>
                        <param>uk.ac.open.kmi.iserve.discovery.api.MatcherPluginModule</param>
                    </services>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Test configuration -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.15</version>
                <configuration>
                    <!--<forkCount>0</forkCount>-->
                    <!--<reuseForks>false</reuseForks>-->
                    <argLine>-Xmx1024m -XX:MaxPermSize=256m</argLine>
                </configuration>
            </plugin>

        </plugins>
    </build>

</project>
