<?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.senslog</groupId>
    <artifactId>connector-period</artifactId>
    <packaging>pom</packaging>

    <version>1.0-SNAPSHOT</version>
    <name>General Senslog Connector</name>

    <profiles>
        <profile>
            <id>LoraWanSenslog1</id>
            <modules>
                <module>connector-fetch-azure</module>
                <module>connector-push-senslog-v1</module>
            </modules>
        </profile>

        <profile>
            <id>FieldClimateSenslog1</id>
            <modules>
                <module>connector-fetch-fieldclimate</module>
                <module>connector-push-senslog-v1</module>
            </modules>
        </profile>

        <profile>
            <id>Senslog1AFarCloud</id>
            <modules>
                <module>connector-fetch-senslog-v1</module>
                <module>connector-push-afarcloud</module>
            </modules>
        </profile>

        <profile>
            <id>DrutesSenslog1</id>
            <modules>
                <module>connector-fetch-drutes</module>
                <module>connector-push-senslog-v1</module>
            </modules>
        </profile>

        <profile>
            <id>AlapansSenslog1</id>
            <modules>
                <module>connector-fetch-alapans</module>
                <module>connector-push-senslog-v1</module>
            </modules>
        </profile>

        <profile>
            <id>GfsSenslog1</id>
            <modules>
                <module>connector-fetch-gfs</module>
                <module>connector-push-senslog-v1</module>
            </modules>
        </profile>

        <profile>
            <id>Senslog1Analytics</id>
            <modules>
                <module>connector-fetch-senslog-v1</module>
                <module>connector-push-analytics</module>
            </modules>
        </profile>

        <profile>
            <id>SenslogTelemetryTheros</id>
            <modules>
                <module>connector-fetch-senslog-telemetry</module>
                <module>connector-push-theros</module>
            </modules>
        </profile>

        <profile>
            <id>DemoLogger</id>
            <modules>
                <module>connector-fetch-demo</module>
                <module>connector-push-logger</module>
            </modules>
        </profile>

        <profile>
            <id>FofrTelemetry</id>
            <modules>
                <module>connector-fetch-fofr</module>
                <module>connector-push-telemetry</module>
            </modules>
        </profile>

        <profile>
            <id>SoilscountSenslog</id>
            <modules>
                <module>connector-fetch-soilscount</module>
                <module>connector-push-senslog-v1</module>
            </modules>
        </profile>

        <profile>
            <id>MetnoSenslog</id>
            <modules>
                <module>connector-fetch-metno</module>
                <module>connector-push-senslog</module>
            </modules>
        </profile>

        <profile>
            <id>OpenMeteoSenslog</id>
            <modules>
                <module>connector-fetch-openmeteo</module>
                <module>connector-push-senslog</module>
            </modules>
        </profile>

        <profile>
            <id>all</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>connector-fetch-azure</module>
                <module>connector-push-senslog-v1</module>
                <module>connector-fetch-fieldclimate</module>
                <module>connector-fetch-senslog-v1</module>
                <module>connector-fetch-senslog-telemetry</module>
                <module>connector-push-afarcloud</module>
                <module>connector-fetch-drutes</module>
                <module>connector-fetch-alapans</module>
                <module>connector-fetch-gfs</module>
                <module>connector-push-analytics</module>
                <module>connector-push-theros</module>
                <module>connector-push-logger</module>
                <module>connector-fetch-fofr</module>
                <module>connector-fetch-soilscount</module>
                <module>connector-push-telemetry</module>
                <module>connector-fetch-metno</module>
                <module>connector-fetch-openmeteo</module>
                <module>connector-push-senslog</module>
            </modules>
        </profile>
    </profiles>

    <modules>
        <module>connector-fetch-api</module>
        <module>connector-app</module>
        <module>connector-model</module>
        <module>connector-push-api</module>
        <module>connector-fetch-drutes</module>
        <module>connector-tools</module>
        <module>connector-fetch-demo</module>
        <module>connector-fetch-alapans</module>
        <module>connector-fetch-gfs</module>
        <module>connector-push-analytics</module>
        <module>connector-fetch-senslog-telemetry</module>
        <module>connector-push-theros</module>
        <module>connector-push-logger</module>
        <module>connector-fetch-fofr</module>
        <module>connector-fetch-soilscount</module>
        <module>connector-push-telemetry</module>
        <module>connector-fetch-metno</module>
        <module>connector-fetch-openmeteo</module>
        <module>connector-push-senslog</module>
    </modules>

    <properties>
        <build.folder>${project.build.directory}/../../bin</build.folder>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <java.version>1.8</java.version>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>${java.version}</source>
                    <target>${java.version}</target>
                    <verbose>true</verbose>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.1.0</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${build.folder}</directory>
                        </fileset>
                        <fileset>
                            <directory>${basedir}</directory>
                            <includes>
                                <include>**/*.log</include>
                            </includes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.1</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${build.folder}</outputDirectory>
                                <descriptorRefs>
                                    <descriptorRef>jar-with-dependencies</descriptorRef>
                                </descriptorRefs>
                                <appendAssemblyId>false</appendAssemblyId>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

</project>