<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">
    <!--
  ~ Copyright (c) 2021 Zoltan Ujhelyi and Eclipse Collections project.
  ~ All rights reserved. This program and the accompanying materials
  ~ are made available under the terms of the Eclipse Public License v1.0
  ~ and Eclipse Distribution License v. 1.0 which accompany this distribution.
  ~ The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
  ~ and the Eclipse Distribution License is available at
  ~ http://www.eclipse.org/org/documents/edl-v10.php.
  -->
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.eclipse.collections</groupId>
    <version>11.1.0-SNAPSHOT</version>
    <artifactId>p2-feature</artifactId>
    <packaging>pom</packaging>

    <name>Eclipse Collections p2 Repository with Feature Build</name>

    <modules>
        <module>org.eclipse.collections.feature</module>
        <module>org.eclipse.collections.repository</module>
    </modules>

    <properties>
        <!-- project defaults -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        <!-- versions used for plug-ins below -->
        <tycho-version>1.7.0</tycho-version>
        <tycho-extras-version>1.7.0</tycho-extras-version>

        <!-- pattern/format used for the qualifier -->
        <qualifier.format>'v'yyyyMMdd-HHmm</qualifier.format>

        <!-- by default complain if working tree is dirty (error|warning|ignore) -->
        <dirtyWorkingTree>warning</dirtyWorkingTree>

        <collections.repository.url>file:///${project.basedir}/../../p2-repository/org.eclipse.collections/target/repository</collections.repository.url>
    </properties>

    <build>
        <plugins>
            <!-- configure default plug-ins -->

            <!-- enable Tycho -->
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-maven-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.eclipse.tycho</groupId>
                        <artifactId>tycho-core</artifactId>
                        <version>${tycho-version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.eclipse.tycho</groupId>
                        <artifactId>tycho-p2-facade</artifactId>
                        <version>${tycho-version}</version>
                    </dependency>
                </dependencies>
                <extensions>true</extensions>
            </plugin>

            <!-- target platform configuration -->
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>target-platform-configuration</artifactId>
                <configuration>
                    <environments>
                        <environment>
                            <os>*</os>
                            <ws>*</ws>
                            <arch>*</arch>
                        </environment>
                    </environments>
                    <includePackedArtifacts>true</includePackedArtifacts>
                </configuration>
            </plugin>

            <!-- configure build qualifier generation as well as source reference headers -->
            <plugin>
                <groupId>org.eclipse.tycho</groupId>
                <artifactId>tycho-packaging-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>org.eclipse.tycho.extras</groupId>
                        <artifactId>tycho-sourceref-jgit</artifactId>
                        <version>${tycho-version}</version>
                    </dependency>
                    <dependency>
                        <groupId>org.eclipse.tycho.extras</groupId>
                        <artifactId>tycho-buildtimestamp-jgit</artifactId>
                        <version>${tycho-version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <!-- use qualifier from properties -->
                    <format>${qualifier.format}</format>
                    <!-- generate bundle .qualifier from Git tags/commits -->
                    <timestampProvider>jgit</timestampProvider>
                    <!-- allow to ignore dirty working trees -->
                    <jgit.dirtyWorkingTree>${dirtyWorkingTree}</jgit.dirtyWorkingTree>
                    <!-- generate source references -->
                    <sourceReferences>
                        <generate>true</generate>
                    </sourceReferences>
                </configuration>
            </plugin>

        </plugins>
        <pluginManagement>
            <!-- define versions and defaults for plug-ins used in Maven -->

            <plugins>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-maven-plugin</artifactId>
                    <version>${tycho-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-packaging-plugin</artifactId>
                    <version>${tycho-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-p2-plugin</artifactId>
                    <version>${tycho-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-p2-director-plugin</artifactId>
                    <version>${tycho-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-p2-repository-plugin</artifactId>
                    <version>${tycho-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-p2-publisher-plugin</artifactId>
                    <version>${tycho-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>target-platform-configuration</artifactId>
                    <version>${tycho-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho</groupId>
                    <artifactId>tycho-source-plugin</artifactId>
                    <version>${tycho-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho.extras</groupId>
                    <artifactId>tycho-source-feature-plugin</artifactId>
                    <version>${tycho-extras-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho.extras</groupId>
                    <artifactId>tycho-custom-bundle-plugin</artifactId>
                    <version>${tycho-extras-version}</version>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.tycho.extras</groupId>
                    <artifactId>tycho-p2-extras-plugin</artifactId>
                    <version>${tycho-extras-version}</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <repositories>
        <repository>
            <id>eclipse.license</id>
            <url>https://download.eclipse.org/cbi/updates/license/</url>
            <layout>p2</layout>
        </repository>
        <repository>
            <id>collections.plugin.repository</id>
            <url>${collections.repository.url}</url>
            <layout>p2</layout>
        </repository>
    </repositories>

    <pluginRepositories>
        <pluginRepository>
            <id>cbi-releases</id>
            <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
        </pluginRepository>
    </pluginRepositories>

</project>
