<?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 http://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.4.6</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <groupId>dev.rebelcraft</groupId>
    <artifactId>j2html-example-webapp</artifactId>
    <version>0.0.3</version>

    <name>j2html-example-webapp</name>
    <description>j2html example webapp</description>
    <url>https://www.rebelcraft.dev</url>

    <properties>
        <java.version>17</java.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>dev.rebelcraft</groupId>
                <artifactId>j2html-extensions-bom</artifactId>
                <version>0.0.3</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>io.github.wimdeblauwe</groupId>
            <artifactId>htmx-spring-boot</artifactId>
            <version>4.0.1</version>
        </dependency>

        <dependency>
            <groupId>dev.rebelcraft</groupId>
            <artifactId>j2html-extensions-spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>dev.rebelcraft</groupId>
            <artifactId>bootstrap-j2html-extension</artifactId>
        </dependency>
        <dependency>
            <groupId>dev.rebelcraft</groupId>
            <artifactId>htmx-j2html-extension</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>
                            <groupId>org.projectlombok</groupId>
                            <artifactId>lombok</artifactId>
                        </exclude>
                    </excludes>
                </configuration>
            </plugin>

        </plugins>
    </build>

    <profiles>
        <profile>
            <id>central</id>
            <properties>
                <gpg.keyname />
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <version>2.18.0</version> <!-- Use the latest version -->
                    </plugin>

                    <plugin>
                        <groupId>org.kordamp.maven</groupId>
                        <artifactId>pomchecker-maven-plugin</artifactId>
                        <version>1.14.0</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>3.2.7</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphraseServerId>${gpg.keyname}</passphraseServerId>
                                    <bestPractices>false</bestPractices>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.central</groupId>
                        <artifactId>central-publishing-maven-plugin</artifactId>
                        <version>0.7.0</version>
                        <extensions>true</extensions>
                        <configuration>
                            <publishingServerId>central</publishingServerId>
                            <ignorePublishedComponents>true</ignorePublishedComponents>
                        </configuration>
                    </plugin>

                </plugins>
            </build>
        </profile>
    </profiles>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Robin Tegg</name>
            <email>robin@tegg.me.uk</email>
            <organization>RebelCraft</organization>
            <organizationUrl>https://www.rebelcraft.dev</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:git://github.com/teggr/j2html-extensions</connection>
        <developerConnection>scm:git:ssh://github.com:teggr/j2html-extensions.git</developerConnection>
        <url>http://github.com/teggr/j2html-extensions/tree/main</url>
    </scm>

</project>