<?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>
    <parent>
        <artifactId>rdfunit-parent</artifactId>
        <groupId>org.aksw.rdfunit</groupId>
        <version>0.7.4</version>
    </parent>

    <artifactId>rdfunit-validate</artifactId>
    <name>RDFUnit - Validate</name>
    <!-- packaging>war</packaging -->

    <dependencies>

        <dependency>
            <groupId>org.aksw.rdfunit</groupId>
            <artifactId>rdfunit-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aksw.rdfunit</groupId>
            <artifactId>rdfunit-resources</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aksw.jena-sparql-api</groupId>
            <artifactId>jena-sparql-api-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-arq</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.jena</groupId>
            <artifactId>jena-core</artifactId>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>

        <dependency>
            <groupId>commons-cli</groupId>
            <artifactId>commons-cli</artifactId>
            <version>1.3</version>
        </dependency>

        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-collections4</artifactId>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.11.v20150529</version>

                <configuration>
                    <scanIntervalSeconds>5</scanIntervalSeconds>
                    <httpConnector>
                        <port>8787</port>
                    </httpConnector>
                    <stopKey />
                    <stopPort />
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <configuration>
                        <formats>jar</formats>
                        <archive>
                            <manifest>
                                <mainClass>org.aksw.rdfunit.validate.cli.ValidateCLI</mainClass>
                            </manifest>
                        </archive>
                        <descriptorRefs>
                            <descriptorRef>jar-with-dependencies</descriptorRef>
                        </descriptorRefs>
                    </configuration>
                    <executions>
                        <execution>
                            <id>make-jar-assembly</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>


    <profiles>
        <profile>
            <id>debpackage</id>

            <build>
                <finalName>rdfunit-cli</finalName>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-shade-plugin</artifactId>
                        <version>2.4</version>
                        <configuration>
                            <!-- put your configurations here -->
                        </configuration>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>shade</goal>
                                </goals>
                                <configuration>
                                    <transformers>
                                        <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                            <mainClass>org.aksw.rdfunit.validate.cli.ValidateCLI</mainClass>
                                        </transformer>
                                    </transformers>
                                    <filters>
                                        <filter>
                                            <artifact>*:*</artifact>
                                            <excludes>
                                                <exclude>META-INF/*.SF</exclude>
                                                <exclude>META-INF/*.DSA</exclude>
                                                <exclude>META-INF/*.RSA</exclude>
                                            </excludes>
                                        </filter>
                                    </filters>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>jdeb</artifactId>
                        <groupId>org.vafer</groupId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>jdeb</goal>
                                </goals>
                                <configuration>
                                    <verbose>true</verbose>
                                    <snapshotExpand>true</snapshotExpand>
                                    <snapshotEnv>${maven.build.timestamp}</snapshotEnv>
                                    <verbose>true</verbose>
                                    <dataSet>
                                        <data>
                                            <src>${basedir}/target/rdfunit-cli.jar</src>
                                            <type>file</type>
                                            <mapper>
                                                <type>perm</type>
                                                <prefix>/usr/share/java/rdfunit</prefix>
                                            </mapper>
                                        </data>
                                        <data>
                                            <src>${project.basedir}/src/deb/control/rdfunit</src>
                                            <type>file</type>
                                            <mapper>
                                                <type>perm</type>
                                                <filemode>777</filemode>
                                                <prefix>/usr/bin</prefix>
                                            </mapper>
                                        </data>

                                        <data>
                                            <src>${basedir}/../data</src>
                                            <type>directory</type>
                                            <includes>*</includes>
                                            <mapper>
                                                <type>perm</type>
                                                <filemode>777</filemode>
                                                <prefix>/usr/share/java/rdfunit/data</prefix>
                                            </mapper>
                                        </data>
                                    </dataSet>
                                    <changesIn>${basedir}/debian/CHANGES.txt</changesIn>
                                    <changesSave>${basedir}/debian/CHANGES.txt</changesSave>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>


