<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>cz.cvut.kbss.jsonld</groupId>
    <artifactId>jb4jsonld</artifactId>
    <version>0.3.2</version>
    <name>JB4JSON-LD</name>
    <description>Java Binding for JSON-LD allows serialization and deserialization of Java POJOs to/from JSON-LD.
        This is the core implementation, which has to be integrated with Jackson, Jersey etc.
    </description>
    <url>https://github.com/kbss-cvut/jb4jsonld</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

        <cz.cvut.kbss.jopa.version>0.9.15</cz.cvut.kbss.jopa.version>

        <junit.version>4.12</junit.version>
        <org.mockito.version>1.10.19</org.mockito.version>
        <com.github.jsonld-java.version>0.11.1</com.github.jsonld-java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>cz.cvut.kbss.jopa</groupId>
            <artifactId>jopa-api</artifactId>
            <version>${cz.cvut.kbss.jopa.version}</version>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${org.mockito.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <version>1.3</version>
        </dependency>
        <!-- JSON-LD Java implementation -->
        <dependency>
            <groupId>com.github.jsonld-java</groupId>
            <artifactId>jsonld-java</artifactId>
            <version>${com.github.jsonld-java.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.4</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.3</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration> <!-- add this to disable checking -->
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <aggregate>true</aggregate>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <!-- explicitly define maven-deploy-plugin after other to force exec order -->
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <executions>
                            <execution>
                                <id>deploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <extensions>
            <!-- Enabling the use of FTP -->
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh</artifactId>
                <version>2.10</version>
            </extension>
        </extensions>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
            </plugin>

            <!-- Code coverage plugin -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>0.8.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- use mvn license:check to check for missing license headers, mvn license:format to add license headers -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>2.11</version>
                <configuration>
                    <header>header.txt</header>
                    <excludes>
                        <exclude>**/src/test/resources/**</exclude>
                        <exclude>**/src/main/resources/**</exclude>
                        <exclude>license</exclude>
                        <exclude>**/pom.xml</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>http://www.gnu.org/copyleft/lesser.html</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Martin Ledvinka</name>
            <email>martin.ledvinka@fel.cvut.cz</email>
            <!--<url>http://cyber.felk.cvut.cz/people</url>-->
            <organization>Czech Technical University in Prague, Knowledge Based and Software Systems Group
            </organization>
            <organizationUrl>http://kbss.felk.cvut.cz</organizationUrl>
            <roles>
            </roles>
        </developer>
    </developers>

    <organization>
        <name>Czech Technical University in Prague, Knowledge Based and Software Systems Group</name>
        <url>http://kbss.felk.cvut.cz</url>
    </organization>

    <scm>
        <url>https://github.com/kbss-cvut/jb4jsonld.git</url>
        <connection>scm:git:https://github.com/kbss-cvut/jb4jsonld.git</connection>
    </scm>

    <distributionManagement>
        <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>
        <site>
            <id>jb4jsonld</id>
            <name>JAXB-JSON-LD</name>
            <url>https://github.com/kbss-cvut/jb4jsonld</url>
        </site>
    </distributionManagement>
</project>
