<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <artifactId>imageio-ext-cog-reader</artifactId>

    <parent>
        <groupId>it.geosolutions.imageio-ext</groupId>
        <artifactId>imageio-ext-cog</artifactId>
        <version>1.4.16</version>
    </parent>

    <name>Cloud Optimized GeoTIFF Reader</name>

    <dependencies>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-tiff</artifactId>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-cog-commons</artifactId>
        </dependency>
        <dependency>
            <groupId>it.geosolutions.imageio-ext</groupId>
            <artifactId>imageio-ext-cog-streams</artifactId>
        </dependency>
    </dependencies>

    <profiles>

        <profile>
            <id>online</id>
            <properties>
                <online.skip.pattern>disabled</online.skip.pattern>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-http</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-s3</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-gs</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-azure</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>cog-http</id>
            <properties>
                <jar.finalName>${project.artifactId}-http-${project.version}</jar.finalName>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-http</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>cog-s3</id>
            <properties>
                <jar.finalName>${project.artifactId}-s3-${project.version}</jar.finalName>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-s3</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>cog-azure</id>
            <properties>
                <jar.finalName>${project.artifactId}-azure-${project.version}</jar.finalName>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-azure</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>

        <profile>
            <id>cog-all</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <properties>
                <jar.finalName>${project.artifactId}-all-${project.version}</jar.finalName>
            </properties>
            <dependencies>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-http</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-s3</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-gs</artifactId>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>it.geosolutions.imageio-ext</groupId>
                    <artifactId>imageio-ext-cog-rangereader-azure</artifactId>
                    <scope>test</scope>
                </dependency>
            </dependencies>
        </profile>

    </profiles>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <runOrder>alphabetical</runOrder>
                    <includes>
                        <include>**/*Test.java</include>
                    </includes>
                    <excludes>
                        <exclude>${online.skip.pattern}</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>
