<?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">

    <parent>
        <groupId>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>9</version>
        <relativePath></relativePath>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <packaging>pom</packaging>

    <groupId>io.bigconnect</groupId>
    <artifactId>dataworker-plugins</artifactId>
    <version>4.2.1</version>

    <name>BigConnect: DataWorker: Plugins</name>
    <description>Various DataWorker Plugins for BigConnect</description>
    <inceptionYear>2016</inceptionYear>

    <organization>
        <name>MWARE SOLUTIONS</name>
        <url>https://bigconnect.io</url>
    </organization>

    <licenses>
        <license>
            <name>GNU Affero General Public License version 3</name>
            <url>https://www.gnu.org/licenses/agpl-3.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>bigconnect</id>
            <name>The BigConnect Team</name>
            <url>https://bigconnect.io</url>
            <organization>MWARE SOLUTIONS SRL</organization>
        </developer>
    </developers>

    <issueManagement>
        <url>https://github.com/bigconnect/dataworker-plugins/issues</url>
        <system>BigConnect Issues</system>
    </issueManagement>

    <scm>
        <url>https://github.com/bigconnect/dataworker-plugins</url>
        <connection>scm:git:git://github.com/bigconnect/dataworker-plugins.git</connection>
        <developerConnection>scm:git:git@github.com:bigconnect/dataworker-plugins.git</developerConnection>
        <tag>HEAD</tag>
    </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>
    </distributionManagement>

    <repositories>
        <repository>
            <id>snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>ossrh-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>
    </repositories>

    <properties>
        <bigconnect.version>4.2.1</bigconnect.version>
        <scala.version>2.11.12</scala.version>
        <scala-maven-plugin.version>3.4.2</scala-maven-plugin.version>
        <scala.binary.version>2.11</scala.binary.version>
        <scala.target.vm>1.8</scala.target.vm>
        <scala.java.additional.args/>
        <hamcrest.version>1.3</hamcrest.version>
        <groovy.version>2.4.5</groovy.version>
        <enforcer.skip>true</enforcer.skip>
    </properties>

    <modules>
        <module>web-schema</module>
        <module>av-utils</module>
        <module>groovy</module>
        <module>ner</module>
        <module>sentiment</module>
        <module>video</module>
        <module>audio</module>
        <module>image</module>
        <module>text</module>
        <module>classification</module>
        <module>url-analysis</module>
        <module>mime-type</module>
        <module>google-services</module>
        <module>tester</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>io.bigconnect</groupId>
            <artifactId>core</artifactId>
            <version>${bigconnect.version}</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.objenesis</groupId>
            <artifactId>objenesis</artifactId>
            <version>3.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <dependencyManagement>
        <dependencies>
            <!-- scala -->
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-reflect</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scalap</artifactId>
                <version>${scala.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-core</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>${hamcrest.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Default scala compile settings -->
                <plugin>
                    <groupId>net.alchim31.maven</groupId>
                    <artifactId>scala-maven-plugin</artifactId>
                    <version>${scala-maven-plugin.version}</version>

                    <configuration>
                        <scalaVersion>${scala.version}</scalaVersion>
                        <scalaCompatVersion>${scala.binary.version}</scalaCompatVersion>
                        <args>
                            <arg>-nobootcp</arg>
                            <arg>-Xmax-classfile-name</arg>
                            <arg>100</arg>
                            <arg>-Xlint</arg>
                            <arg>-target:jvm-${scala.target.vm}</arg>
                            <arg>${scala.java.additional.args}</arg>
                        </args>
                        <jvmArgs>
                            <jvmArg>-Xms64m</jvmArg>
                            <jvmArg>-Xmx1024m</jvmArg>
                        </jvmArgs>
                    </configuration>

                    <!-- This is needed to mix scala and java code in the same module -->
                    <executions>
                        <execution>
                            <id>scala-compile</id>
                            <phase>process-resources</phase>
                            <goals>
                                <goal>add-source</goal>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>scala-test-compile</id>
                            <phase>process-test-resources</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <showWarnings>false</showWarnings>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.2.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
        </plugins>
    </build>


    <profiles>
        <profile>
            <id>ossrh-release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.1.1</version>
                        <configuration>
                            <source>8</source>
                            <detectJavaApiLink>false</detectJavaApiLink>
                            <failOnError>false</failOnError>
                            <failOnWarnings>false</failOnWarnings>
                        </configuration>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.8.2</version>
                        <executions>
                            <execution>
                                <id>default-deploy</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifact</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
