<?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.0.0</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>be.tomcools</groupId>
    <artifactId>rickroll-security-spring-boot-starter</artifactId>
    <version>3.0.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>
    </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.10.1</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.4.0-SNAPSHOT</version>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>publication</id>
            <build>
                <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>
                    <plugin>
                        <groupId>org.jreleaser</groupId>
                        <artifactId>jreleaser-maven-plugin</artifactId>
                        <configuration>
                            <jreleaser>
                                <project>
                                    <copyright>2022 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>
                                    </github>
                                </release>
                                <announce>
                                    <active>ALWAYS</active>
                                    <mastodon>
                                        <active>ALWAYS</active>
                                        <host>https://mastodon.social/</host>
                                        <status>🚀 {{projectNameCapitalized}} {{projectVersion}} has been released!</status>
                                    </mastodon>
                                </announce>
                                <deploy>
                                    <maven>
                                        <nexus2>
                                            <maven-central>
                                                <active>ALWAYS</active>
                                                <url>https://oss.sonatype.org/service/local</url>
                                                <applyMavenCentralRules>true</applyMavenCentralRules>
                                                <closeRepository>true</closeRepository>
                                                <releaseRepository>true</releaseRepository>
                                                <stagingRepositories>target/staging-deploy</stagingRepositories>
                                            </maven-central>
                                        </nexus2>
                                    </maven>
                                </deploy>
                            </jreleaser>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <repositories>
        <repository>
            <id>central</id>
            <name>Central Repository</name>
            <url>https://repo.maven.apache.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>spring-milestones</id>
            <name>Spring Milestones</name>
            <url>https://repo.spring.io/milestone</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

</project>
