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

    <parent>
        <groupId>com.workfusion.odf</groupId>
        <artifactId>odf</artifactId>
        <version>10.0.0.18</version>
    </parent>

    <artifactId>odf-components-parent</artifactId>
    <packaging>pom</packaging>

    <properties>
        <project.build.javaVersion>1.8</project.build.javaVersion>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <jacoco.skip>true</jacoco.skip>
        <sonar.language>java</sonar.language>
        <sonar.host.url>https://sonar.workfusion.com</sonar.host.url>
        <sonar.issuesReport.html.enable>true</sonar.issuesReport.html.enable>
        <sonar.issuesReport.console.enable>true</sonar.issuesReport.console.enable>
        <sonar.sourceEncoding>UTF-8</sonar.sourceEncoding>
    </properties>

    <modules>
        <module>odf-components</module>
        <module>odf-bcb</module>
    </modules>

    <repositories>
        <repository>
            <id>wf-dependencies</id>
            <name>WorkFusion Nexus Repository - dependencies</name>
            <url>https://repository.workfusion.com/content/groups/dependencies</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </snapshots>
        </repository>

        <repository>
            <id>wf-internal-dependencies</id>
            <name>WorkFusion Nexus Repository - dependencies</name>
            <url>http://ci.crowdcomputingsystems.com:8081/nexus/content/groups/public</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>daily</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
    </repositories>

    <distributionManagement>
        <repository>
            <id>odf-releases</id>
            <name>Releases</name>
            <url>https://repository.workfusion.com/content/repositories/releases</url>
        </repository>
        <snapshotRepository>
            <id>wf-snapshots</id>
            <name>Snapshots</name>
            <url>https://repository.workfusion.com/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.4</version>
                </plugin>
                <plugin>
                    <groupId>org.sonarsource.scanner.maven</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>3.6.1.1688</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-no-snapshots</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireReleaseDeps>
                                    <onlyWhenRelease>true</onlyWhenRelease>
                                    <message>Release build should not contain snapshot dependencies</message>
                                </requireReleaseDeps>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>
