<?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>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>3.2.5</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>be.tomcools</groupId>
    <artifactId>rickroll-security-spring-boot-starter</artifactId>
    <version>3.2.0</version>
    <name>rickroll-security-spring-boot-starter</name>
    <description>Redirects common security endpoints to Rick Astley - Never Gonna Give You Up</description>

    <url>https://github.com/TomCools/rickroll-security-spring-boot-starter</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Tom Cools</name>
            <email>tom.cools@live.be</email>
            <url>https://www.tomcools.be</url>
        </developer>
    </developers>
    <organization>
        <name>Tom Cools</name>
        <url>https://www.tomcools.be</url>
    </organization>
    <scm>
        <url>https://github.com/TomCools/rickroll-security-spring-boot-starter</url>
        <connection>scm:git:https://github.com/TomCools/rickroll-security-spring-boot-starter.git</connection>
        <developerConnection>scm:git:https://github.com/TomCools/rickroll-security-spring-boot-starter.git
        </developerConnection>
        <tag>rickroll-security-spring-boot-starter-0.0.1</tag>
    </scm>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <properties>
        <java.version>17</java.version>
        <jreleaser.dry.run>true</jreleaser.dry.run>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>


    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>3.0.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.11.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.4.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-sources-plugin</artifactId>
                    <version>3.2.1</version>
                </plugin>
                <plugin>
                    <groupId>org.jreleaser</groupId>
                    <artifactId>jreleaser-maven-plugin</artifactId>
                    <version>1.12.0</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.jreleaser</groupId>
                <artifactId>jreleaser-maven-plugin</artifactId>
                <configuration>
                    <jreleaser>
                        <project>
                            <copyright>2024 Tom Cools</copyright>
                        </project>
                        <signing>
                            <active>ALWAYS</active>
                            <armored>true</armored>
                        </signing>

                        <release>
                            <github>
                                <enabled>true</enabled>
                                <owner>TomCools</owner>
                                <host>github.com</host>
                                <apiEndpoint>https://api.github.com</apiEndpoint>
                                <changelog>
                                    <formatted>ALWAYS</formatted>
                                    <preset>conventional-commits</preset>
                                    <hide>
                                        <uncategorized>true</uncategorized>
                                        <contributors>
                                            <contributor>tomco</contributor>
                                        </contributors>
                                    </hide>
                                </changelog>
                            </github>
                        </release>

                        <announce>
                            <active>ALWAYS</active>
                            <mastodon>
                                <active>ALWAYS</active>
                                <host>https://mastodon.social/</host>
                                <status>🚀 {{projectNameCapitalized}} {{projectVersion}} has been released!</status>
                            </mastodon>
                            <bluesky>
                                <active>ALWAYS</active>
                                <host>https://bsky.social</host>
                                <handle>tcoolsit.bsky.social</handle>
                                <statuses>
                                    <status>🚀 {{projectNameCapitalized}} {{projectVersion}} has been released!</status>
                                </statuses>
                            </bluesky>
                        </announce>

                        <deploy>
                            <maven>
                                <pomchecker>
                                    <version>1.11.0</version>
                                </pomchecker>
                                <nexus2>
                                    <maven-central>
                                        <active>ALWAYS</active>
                                        <url>https://oss.sonatype.org/service/local</url>
                                        <snapshotUrl>https://s01.oss.sonatype.org/content/repositories/snapshots/
                                        </snapshotUrl>
                                        <applyMavenCentralRules>true</applyMavenCentralRules>
                                        <closeRepository>true</closeRepository>
                                        <releaseRepository>true</releaseRepository>
                                        <stagingRepositories>target/staging-deploy</stagingRepositories>
                                    </maven-central>
                                </nexus2>
                            </maven>
                        </deploy>

                        <!-- Hooks and extensions -->
                        <extensions>
                            <ascii-art-steps>
                                <enabled>false</enabled>
                                <!--<directory>D:\</directory>-->
                                <gav>be.tomcools:jreleaser-demo-extension:1.0.0</gav>
                                <providers>
                                    <provider>
                                        <type>be.tomcools.jreleaser.AsciiArtSteps</type>
                                    </provider>
                                </providers>
                            </ascii-art-steps>
                        </extensions>

                    </jreleaser>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>publication</id>
            <properties>
                <altDeploymentRepository>local::file:./target/staging-deploy</altDeploymentRepository>
            </properties>
            <build>
                <defaultGoal>deploy</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <attach>true</attach>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <attach>true</attach>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
