<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>io.wcm.maven</groupId>
        <artifactId>io.wcm.maven.global-parent</artifactId>
        <version>75</version>
    </parent>

    <groupId>io.wcm.caravan</groupId>
    <artifactId>wcm-io-handy-uri-templates</artifactId>
    <version>2.2.0</version>

    <name>wcm.io Caravan Handy URI Templates</name>
    <description>
        Handy URI Templates is a RFC6570 compliant URI template processor. The library allows clients to
        utilize templatized URIs and inject replacement variables to expand the template into a URI. The library sports
        a fluent API, ability to plugin custom object renderers, and supports all levels of URI templates.
    </description>

    <properties>
        <java.version>11</java.version>
        <bnd.version>7.2.3</bnd.version>
        <jackson.version>2.18.6</jackson.version>
    </properties>

    <url>https://github.com/wcm-io-caravan/Handy-URI-Templates</url>

    <scm>
        <url>https://github.com/wcm-io-caravan/Handy-URI-Templates.git</url>
        <connection>scm:git:git@github.com:wcm-io-caravan/Handy-URI-Templates.git</connection>
        <developerConnection>scm:git:git@github.com:wcm-io-caravan/Handy-URI-Templates.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <system>Github Issues</system>
        <url>https://github.com/wcm-io-caravan/Handy-URI-Templates/issues</url>
    </issueManagement>

    <ciManagement>
        <system>GitHub Actions</system>
        <url>https://github.com/wcm-io-caravan/Handy-URI-Templates/actions</url>
    </ciManagement>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <inceptionYear>2012</inceptionYear>

    <organization>
        <name>wcm.io Caravan</name>
        <url>https://caravan.wcm.io</url>
    </organization>

    <developers>
        <developer>
            <name>Ryan J. McDonough</name>
            <email>ryan@damnhandy.com</email>
            <organizationUrl>http://www.damnhandy.com/</organizationUrl>
        </developer>
        <developer>
            <name>wcm.io Community</name>
            <organization>wcm.io</organization>
            <organizationUrl>https://wcm.io</organizationUrl>
        </developer>
    </developers>

    <build>
        <plugins>
            <plugin>
                <groupId>biz.aQute.bnd</groupId>
                <artifactId>bnd-maven-plugin</artifactId>
                <version>${bnd.version}</version>
                <configuration>
                    <bnd>
                        <!-- Do not set Bundle-Developers -->
                        Bundle-Developers:
                        <!-- Export all versioned packages by default -->
                        -exportcontents: ${packages;VERSIONED}
                        <!-- Use "SNAPSHOT" suffix for snapshot bundle versions -->
                        -snapshot: SNAPSHOT
                        <!-- Remove Private-Package header as it may contain lists of all SLING-INF folders -->
                        -removeheaders: Private-Package
                        <!-- reproducible builds (https://github.com/bndtools/bnd/issues/3521) -->
                        -noextraheaders: true
                        <!-- Do not create imports for java.* as this leads to failed builds with AEM cloud service -->
                        -noimportjava: true
                    </bnd>
                </configuration>
                <executions>
                    <execution>
                    <id>bnd-process</id>
                    <goals>
                        <goal>bnd-process</goal>
                    </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- TODO: enabled baseline plugin after first release -->
            <!--
            <plugin>
                <groupId>biz.aQute.bnd</groupId>
                <artifactId>bnd-baseline-maven-plugin</artifactId>
                <version>${bnd.version}</version>
                <configuration>
                    <includeDistributionManagement>false</includeDistributionManagement>
                    <fullReport>true</fullReport>
                </configuration>
                <executions>
                    <execution>
                        <id>bnd-baseline</id>
                        <goals>
                            <goal>baseline</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            -->

            <!-- include manifest with OSGi headers -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                <archive>
                    <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                </archive>
                </configuration>
            </plugin>

            <!-- suppress javadoc warnings/errors -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <doclint>none</doclint>
                    <failOnError>false</failOnError>
                </configuration>
            </plugin>

            <!-- Match different test naming conventions -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <includes>
                        <include>**/*Test.java</include>
                        <include>**/Test*.java</include>
                        <include>**/*Tests.java</include>
                    </includes>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <dependencies>

        <!-- JUnit -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
            <scope>test</scope>
        </dependency>

        <!-- JSON -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>${jackson.version}</version>
            <optional>true</optional>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>${jackson.version}</version>
            <optional>true</optional>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>${jackson.version}</version>
            <optional>true</optional>
            <scope>compile</scope>
        </dependency>

        <!-- Async HTTP Client -->
        <dependency>
            <groupId>com.ning</groupId>
            <artifactId>async-http-client</artifactId>
            <version>1.9.40</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.13</version>
            <scope>test</scope>
        </dependency>

        <!-- Date/Time Utilities -->
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
            <version>2.10.6</version>
            <scope>compile</scope>
        </dependency>

        <!-- OSGi Versioning -->
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.annotation.versioning</artifactId>
            <version>1.1.2</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <profiles>
        <!-- profile used for building releases and deployment to sonatype/maven central -->
        <profile>
        <id>release-profile</id>
        <activation>
            <property>
            <name>performRelease</name>
            <value>true</value>
            </property>
        </activation>
        <build>
            <plugins>
                <!-- sign the build -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <inherited>true</inherited>
                    <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <goals>
                        <goal>sign</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                    </executions>
                </plugin>
                <!-- configure staging process at sonatype.-->
                <plugin>
                    <groupId>org.sonatype.central</groupId>
                    <artifactId>central-publishing-maven-plugin</artifactId>
                    <extensions>true</extensions>
                    <inherited>true</inherited>
                    <configuration>
                    <publishingServerId>sonatype-central</publishingServerId>
                    <deploymentName>${project.artifactId} ${project.version}</deploymentName>
                    </configuration>
                </plugin>
            </plugins>
        </build>
        </profile>
    </profiles>

</project>
