<?xml version="1.0"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>eu.fbk.knowledgestore</groupId>
        <artifactId>ks</artifactId>
        <version>1.6.1</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>eu.fbk.knowledgestore</groupId>
    <artifactId>ks-distribution</artifactId>
    <packaging>jar</packaging>

    <name>ks-distribution</name>
    <description></description>
    <url>http://knowledgestore.fbk.eu/ks-distribution/</url>

    <distributionManagement>
        <site>
            <id>siteks</id>
            <url>${site-path}/ks-distribution/</url>
        </site>
    </distributionManagement>

    <dependencies>
        <!-- Note: order of dependencies is important! don't move the first four! -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.23</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>eu.fbk.knowledgestore</groupId>
            <artifactId>ks-tool</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>eu.fbk.knowledgestore</groupId>
            <artifactId>ks-core</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>eu.fbk.knowledgestore</groupId>
            <artifactId>ks-client</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>eu.fbk.knowledgestore</groupId>
            <artifactId>ks-populator-naf</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>eu.fbk.knowledgestore</groupId>
            <artifactId>ks-populator-rdf</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>eu.fbk.knowledgestore</groupId>
            <artifactId>ks-server</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>eu.fbk.knowledgestore</groupId>
            <artifactId>ks-server-http</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>eu.fbk.knowledgestore</groupId>
            <artifactId>ks-server-virtuoso</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>eu.fbk.knowledgestore</groupId>
            <artifactId>ks-server-hbase</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- Runtime dependencies required by server & tools -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>log4j-over-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.fusesource.jansi</groupId>
            <artifactId>jansi</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.paranamer</groupId>
            <artifactId>paranamer</artifactId>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <properties>
        <parent-path>/..</parent-path>
    </properties>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <activeByDefault>false</activeByDefault>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-assemblies</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <descriptors>
                                <descriptor>src/main/assembly/src.xml</descriptor>
                                <descriptor>src/main/assembly/server.xml</descriptor>
                                <descriptor>src/main/assembly/client.xml</descriptor>
                                <descriptor>src/main/assembly/tools.xml</descriptor>
                            </descriptors>
                        </configuration>
                    </plugin>

                    <!-- Create an empty javadoc (bad) -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.5</version>
                        <executions>
                            <execution>
                                <id>empty-javadoc-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <classifier>javadoc</classifier>
                                    <classesDirectory>${basedir}/javadoc</classesDirectory>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
