<?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>it.bz.opendatahub.alpinebits</groupId>
        <artifactId>alpinebits-root</artifactId>
        <version>2.1.0</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>examples-root</artifactId>
    <version>2.1.0</version>

    <packaging>pom</packaging>
    <name>AlpineBits examples - root</name>

    <modules>
        <module>freerooms</module>
        <module>handshaking</module>
        <module>housekeeping</module>
        <module>inventory</module>
    </modules>

    <properties>
        <!-- Skip Sonar analysis for examples module -->
        <sonar.skip>true</sonar.skip>

        <jackson.version>2.11.1</jackson.version>

        <maven-war-plugin.version>3.2.2</maven-war-plugin.version>
        <cargo-maven2-plugin.version>1.6.11</cargo-maven2-plugin.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.fasterxml.jackson.core</groupId>
                <artifactId>jackson-databind</artifactId>
                <version>${jackson.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>${maven-war-plugin.version}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.cargo</groupId>
                    <artifactId>cargo-maven2-plugin</artifactId>
                    <version>${cargo-maven2-plugin.version}</version>
                    <configuration>
                        <container>
                            <containerId>tomcat8x</containerId>
                            <artifactInstaller>
                                <groupId>org.apache.tomcat</groupId>
                                <artifactId>tomcat</artifactId>
                                <version>${tomcat-embedded.version}</version>
                            </artifactInstaller>
                        </container>
                        <configuration>
                            <type>standalone</type>
                            <home>
                                ${project.build.directory}/apache-tomcat-${tomcat-embedded.version}
                            </home>
                            <properties>
                                <cargo.servlet.port>8080</cargo.servlet.port>
                                <cargo.jvmargs>
                                    -Xdebug
                                    -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005
                                </cargo.jvmargs>
                            </properties>
                        </configuration>
                        <deployables>
                            <deployable>
                                <groupId>${project.groupId}</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                                <type>war</type>
                                <properties>
                                    <context>/${project.artifactId}</context>
                                </properties>
                            </deployable>
                        </deployables>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
</project>
