<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>xyz.tcheeric</groupId>
  <artifactId>bottin</artifactId>
  <version>0.10.0</version>
  <packaging>pom</packaging>
  <name>Bottin - NIP-05 Registry Service</name>
  <description>Production-ready NIP-05 registry service with persistent storage, REST API, admin dashboard, and domain verification</description>
  <url>https://github.com/tcheeric/bottin</url>
  <licenses>
    <license>
      <name>MIT License</name>
      <url>https://opensource.org/licenses/MIT</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <name>Eric</name>
      <organization>398ja</organization>
    </developer>
  </developers>
  <modules>
    <module>bottin-core</module>
    <module>bottin-persistence</module>
    <module>bottin-service</module>
    <module>bottin-api</module>
    <module>bottin-verification</module>
    <module>bottin-reach</module>
    <module>bottin-admin-ui</module>
    <module>bottin-client-ui</module>
    <module>bottin-web-assets</module>
    <module>bottin-spring-boot-starter</module>
    <module>bottin-tests</module>
  </modules>
  <scm>
    <connection>scm:git:git://github.com/tcheeric/bottin.git</connection>
    <developerConnection>scm:git:ssh://github.com:tcheeric/bottin.git</developerConnection>
    <url>https://github.com/tcheeric/bottin/tree/main</url>
  </scm>
  <distributionManagement>
    <repository>
      <id>reposilite-releases</id>
      <url>https://maven.398ja.xyz/releases</url>
    </repository>
    <snapshotRepository>
      <id>reposilite-snapshots</id>
      <url>https://maven.398ja.xyz/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <wiremock.version>3.4.2</wiremock.version>
    <flyway.version>10.10.0</flyway.version>
    <nostrdb-jni.version>0.1.2</nostrdb-jni.version>
    <maven-source-plugin.version>3.3.0</maven-source-plugin.version>
    <jackson.version>2.17.0</jackson.version>
    <spring-boot.version>3.4.1</spring-boot.version>
    <flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
    <maven.javadoc.skip>true</maven.javadoc.skip>
    <webjars-locator.version>0.52</webjars-locator.version>
    <selenium.version>4.25.0</selenium.version>
    <maven-javadoc-plugin.version>3.6.3</maven-javadoc-plugin.version>
    <slf4j.version>2.0.12</slf4j.version>
    <nostr-java.version>2.0.7</nostr-java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <assertj.version>3.25.3</assertj.version>
    <junit.version>5.10.2</junit.version>
    <jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
    <maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
    <npm.version>10.2.4</npm.version>
    <maven-failsafe-plugin.version>3.2.5</maven-failsafe-plugin.version>
    <java.version>21</java.version>
    <maven.compiler.source>21</maven.compiler.source>
    <maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
    <docker.image.prefix>${docker.registry}</docker.image.prefix>
    <jib-maven-plugin.version>3.4.1</jib-maven-plugin.version>
    <docker.registry>docker.398ja.xyz</docker.registry>
    <h2.version>2.2.224</h2.version>
    <mockito.version>5.11.0</mockito.version>
    <frontend-maven-plugin.version>1.15.1</frontend-maven-plugin.version>
    <lombok.version>1.18.32</lombok.version>
    <htmx.version>1.9.10</htmx.version>
    <maven.compiler.target>21</maven.compiler.target>
    <dnsjava.version>3.6.0</dnsjava.version>
    <maven-surefire-plugin.version>3.2.5</maven-surefire-plugin.version>
    <node.version>v20.11.1</node.version>
    <nap-java.version>0.6.0</nap-java.version>
    <testcontainers.version>1.19.7</testcontainers.version>
    <postgresql.version>42.7.3</postgresql.version>
    <springdoc-openapi.version>2.4.0</springdoc-openapi.version>
    <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version>
  </properties>
  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-core</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-web-assets</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-persistence</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-service</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-api</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-admin-ui</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-client-ui</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-verification</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-reach</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>bottin-spring-boot-starter</artifactId>
        <version>${project.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>nostr-java-client</artifactId>
        <version>${nostr-java.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>nostr-java-event</artifactId>
        <version>${nostr-java.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>nostr-java-core</artifactId>
        <version>${nostr-java.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>nap-spring</artifactId>
        <version>${nap-java.version}</version>
      </dependency>
      <dependency>
        <groupId>xyz.tcheeric</groupId>
        <artifactId>imani-nostrdb</artifactId>
        <version>${nostrdb-jni.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring-boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>${jackson.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-core</artifactId>
        <version>${flyway.version}</version>
      </dependency>
      <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-database-postgresql</artifactId>
        <version>${flyway.version}</version>
      </dependency>
      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>${h2.version}</version>
      </dependency>
      <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>${postgresql.version}</version>
      </dependency>
      <dependency>
        <groupId>dnsjava</groupId>
        <artifactId>dnsjava</artifactId>
        <version>${dnsjava.version}</version>
      </dependency>
      <dependency>
        <groupId>org.springdoc</groupId>
        <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
        <version>${springdoc-openapi.version}</version>
      </dependency>
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${lombok.version}</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
      </dependency>
      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.4.14</version>
      </dependency>
      <dependency>
        <groupId>org.junit</groupId>
        <artifactId>junit-bom</artifactId>
        <version>${junit.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-junit-jupiter</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.assertj</groupId>
        <artifactId>assertj-core</artifactId>
        <version>${assertj.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>testcontainers-bom</artifactId>
        <version>${testcontainers.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.testcontainers</groupId>
        <artifactId>postgresql</artifactId>
        <version>${testcontainers.version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.wiremock</groupId>
        <artifactId>wiremock-standalone</artifactId>
        <version>${wiremock.version}</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <repositories>
    <repository>
      <id>reposilite-releases</id>
      <url>https://maven.398ja.xyz/releases</url>
    </repository>
    <repository>
      <id>reposilite-snapshots</id>
      <url>https://maven.398ja.xyz/snapshots</url>
    </repository>
  </repositories>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${maven-compiler-plugin.version}</version>
          <configuration>
            <release>${java.version}</release>
            <encoding>${project.build.sourceEncoding}</encoding>
            <parameters>true</parameters>
            <showWarnings>true</showWarnings>
            <showDeprecation>true</showDeprecation>
            <compilerArgs>
              <arg>-Xlint:all</arg>
              <arg>-Xlint:-processing</arg>
            </compilerArgs>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${maven-surefire-plugin.version}</version>
          <configuration>
            <argLine>@{argLine} -Xmx1024m</argLine>
            <includes>
              <include>**/*Test.java</include>
              <include>**/*Tests.java</include>
            </includes>
            <excludes>
              <exclude>**/*IT.java</exclude>
              <exclude>**/*IntegrationTest.java</exclude>
            </excludes>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${maven-failsafe-plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>integration-test</goal>
                <goal>verify</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <argLine>@{argLine} -Xmx1024m</argLine>
            <includes>
              <include>**/*IT.java</include>
              <include>**/*IntegrationTest.java</include>
            </includes>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${maven-jar-plugin.version}</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
              </manifest>
            </archive>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${maven-resources-plugin.version}</version>
          <configuration>
            <encoding>${project.build.sourceEncoding}</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>flatten-maven-plugin</artifactId>
          <version>${flatten-maven-plugin.version}</version>
          <executions>
            <execution>
              <id>flatten</id>
              <phase>process-resources</phase>
              <goals>
                <goal>flatten</goal>
              </goals>
            </execution>
            <execution>
              <id>flatten.clean</id>
              <phase>clean</phase>
              <goals>
                <goal>clean</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <updatePomFile>true</updatePomFile>
            <flattenMode>resolveCiFriendliesOnly</flattenMode>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>${jacoco-maven-plugin.version}</version>
          <executions>
            <execution>
              <goals>
                <goal>prepare-agent</goal>
              </goals>
            </execution>
            <execution>
              <id>report</id>
              <phase>test</phase>
              <goals>
                <goal>report</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin.version}</version>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar-no-fork</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${maven-javadoc-plugin.version}</version>
          <executions>
            <execution>
              <id>attach-javadocs</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
          <configuration>
            <doclint>none</doclint>
            <source>${java.version}</source>
            <skip>${maven.javadoc.skip}</skip>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-maven-plugin</artifactId>
          <version>${spring-boot.version}</version>
        </plugin>
        <plugin>
          <groupId>com.google.cloud.tools</groupId>
          <artifactId>jib-maven-plugin</artifactId>
          <version>${jib-maven-plugin.version}</version>
          <configuration>
            <from>
              <image>eclipse-temurin:21-jre-alpine</image>
            </from>
            <to>
              <image>${docker.image.prefix}/${project.artifactId}</image>
              <tags>
                <tag>${project.version}</tag>
                <tag>latest</tag>
              </tags>
            </to>
            <container>
              <jvmFlags>
                <jvmFlag>-Xms256m</jvmFlag>
                <jvmFlag>-Xmx512m</jvmFlag>
                <jvmFlag>-XX:+UseG1GC</jvmFlag>
                <jvmFlag>-XX:+UseContainerSupport</jvmFlag>
              </jvmFlags>
              <ports>
                <port>8080</port>
              </ports>
              <environment>
                <SPRING_PROFILES_ACTIVE>docker</SPRING_PROFILES_ACTIVE>
              </environment>
              <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
            </container>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>it</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <includes>
                <include>**/*IT.java</include>
              </includes>
              <excludes>
                <exclude>**/*E2ETest.java</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>e2e</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>integration-test</goal>
                  <goal>verify</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <includes>
                <include>**/*E2ETest.java</include>
              </includes>
              <excludes>
                <exclude>**/*IT.java</exclude>
              </excludes>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>docker</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>jib-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
