<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (c) 2014. 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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>uk.ac.open.kmi.iserve</groupId>
    <artifactId>iserve-parent</artifactId>
    <version>2.0.2</version>
    <packaging>pom</packaging>

    <name>iServe</name>
    <url>http://kmi.github.io/iserve/latest</url>
    <description>
        iServe is what we refer to as service warehouse which unifies service
        publication, analysis, and discovery through the use of lightweight semantics
        as well as advanced discovery and analytic capabilities. iServe provides the
        typical features of service registries and additional functionality that
        exploits service descriptions, service annotations and further data gathered and
        derived from the analysis of these descriptions, data crawled from the Web,
        periodic monitoring and user activities.

        iServe builds upon lessons learnt from research and development on the Web and
        on service discovery algorithms to provide a generic semantic service registry
        able to support advanced discovery over both Web APIs and WSDL services
        described using heterogeneous formalisms.
    </description>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/kmi/iserve</url>
        <connection>scm:git:git@github.com:kmi/iserve.git</connection>
        <developerConnection>scm:git:git@github.com:kmi/iserve.git</developerConnection>
        <tag>v2.0.2</tag>
    </scm>

    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/kmi/iserve/issues</url>
    </issueManagement>

    <distributionManagement>
        <site>
            <id>github-pages-site</id>
            <name>Deployment through GitHub's site deployment plugin</name>
            <url>${site.path}</url>
        </site>
        <!-- Releases to repository -->
        <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>

    <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>izzyblues</id>
            <name>Luca Panziera</name>
            <email>luca.panziera-{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>

    <properties>
        <!-- Convenience properties for all subprojects -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.6</maven.compiler.source>
        <maven.compiler.target>1.6</maven.compiler.target>
        <jersey.version>2.0</jersey.version>
        <junit.version>4.8.2</junit.version>
        <jena.version>2.11.0</jena.version>
        <httpclient.version>4.2.3</httpclient.version>
        <slf4j.version>1.7.5</slf4j.version>
        <shiro.version>1.2.2</shiro.version>
        <jetty.version>8.1.11.v20130520</jetty.version>
        <guice.version>3.0</guice.version>
        <guava.version>14.0</guava.version>
        <commons-config.version>1.9</commons-config.version>
        <msm4j.version>1.3.3</msm4j.version>
        <test-collections.version>1.0.0</test-collections.version>
        <!--<servlet.version>3.0.1</servlet.version>-->
        <servlet.version>2.5</servlet.version>
        <gson.version>2.2.4</gson.version>

        <!-- Configuration for GitHub deployment -->
        <site.path>${project.version}</site.path>
        <github.global.server>github</github.global.server>
        <repositoryName>iserve</repositoryName>
        <repositoryOwner>kmi</repositoryOwner>
    </properties>

    <modules>
        <module>iserve-sal-core</module>
        <module>iserve-discovery-api</module>
        <module>iserve-semantic-discovery</module>
        <module>iserve-webapp</module>
        <module>iserve-integrated-engine</module>
        <module>iserve-elda</module>
        <module>iserve-swagger</module>
        <module>iserve-popularity-scoring</module>
        <module>iserve-sparql-text-search</module>
        <module>iserve-service-type-filtering</module>
        <module>iserve-rest</module>
    </modules>

    <dependencies>
        <!-- Loging -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${slf4j.version}</version>
        </dependency>

        <!--Use log4j for runtime-->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>${slf4j.version}</version>
            <scope>runtime</scope>
        </dependency>

        <!--Test dependencies-->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <!-- Profile activated on release -->
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <!-- Activate PGP signing only when performing a release -->
                    <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>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Generate source jar on release -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Generate javadoc jar on release -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- Profile for updating the latest Web page on github site -->
        <profile>
            <id>update-latest</id>
            <properties>
                <site.path>latest</site.path>
            </properties>
        </profile>
    </profiles>

    <build>
        <plugins>

            <!-- Configure Maven site plugin for Reflow skin and Markdown support -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.3</version>
                <dependencies>
                    <dependency>
                        <!-- Markdown support for writing website content -->
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-markdown</artifactId>
                        <version>1.3</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <port>10000</port>
                    <generateReports>true</generateReports>
                    <inputEncoding>UTF-8</inputEncoding>
                    <outputEncoding>UTF-8</outputEncoding>
                    <!-- Site deployment done using GitHub site plugin -->
                    <skipDeploy>true</skipDeploy>
                </configuration>
            </plugin>

            <!-- GitHub site plug-in for deployment to GitHub pages -->
            <plugin>
                <groupId>com.github.github</groupId>
                <artifactId>site-maven-plugin</artifactId>
                <version>0.12</version>
                <configuration>
                    <message>Creating site for ${project.artifactId}, ${project.version}</message>
                    <!-- this does the trick to place every module in the correct subfolder -->
                    <path>${project.distributionManagement.site.url}</path>
                    <merge>true</merge>
                    <!--<dryRun>true</dryRun>-->
                </configuration>
                <executions>
                    <execution>
                        <id>github-site</id>
                        <goals>
                            <goal>site</goal>
                        </goals>
                        <phase>site</phase>
                    </execution>
                </executions>
            </plugin>

            <!-- Maven Release Configuration for nexus staging -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <tagNameFormat>v@{project.version}</tagNameFormat>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <useReleaseProfile>false</useReleaseProfile>
                    <releaseProfiles>release</releaseProfiles>
                    <!--<goals>deploy site-deploy</goals>-->
                    <goals>deploy</goals>
                </configuration>
            </plugin>

            <!-- Staging to Sonatype -->
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.3</version>
                <extensions>true</extensions>
                <configuration>
                    <serverId>ossrh</serverId>
                    <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                    <autoReleaseAfterClose>true</autoReleaseAfterClose>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <!--Javadoc-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <links>
                        <link>http://download.oracle.com/javase/1.5.0/docs/api/</link>
                    </links>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports><!-- select non-aggregate reports -->
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.7</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>summary</report>
                            <report>license</report>
                            <report>modules</report>
                            <report>project-team</report>
                            <report>scm</report>
                            <report>issue-tracking</report>
                            <!--<report>dependencies</report>-->
                            <!--<report>dependency-convergence</report>-->
                            <!--<report>plugins</report>-->
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>2.8</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>changes-report</report>
                            <!-- <report>github-report</report> -->
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>