<?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.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>9</version>
  </parent>

  <groupId>ch.rasc</groupId>
  <artifactId>sse-eventbus</artifactId>
  <version>3.2.0</version>

  <name>Sse Eventbus Library</name>
  <description>A simple eventbus library to track connected sse clients and broadcast messages</description>
  <url>https://github.com/ralscha/sse-eventbus/</url>

  <inceptionYear>2016</inceptionYear>

  <licenses>
    <license>
      <name>Apache 2</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <name>Ralph Schaer</name>
      <email>ralphschaer@gmail.com</email>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:ralscha/sse-eventbus.git</connection>
    <developerConnection>scm:git:git@github.com:ralscha/sse-eventbus.git</developerConnection>
    <url>https://github.com/ralscha/sse-eventbus.git</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/ralscha/sse-eventbus/issues</url>
  </issueManagement>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-framework-bom</artifactId>
        <version>7.0.7</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>

    <dependency>
      <groupId>io.micrometer</groupId>
      <artifactId>micrometer-observation</artifactId>
      <version>1.16.5</version>
    </dependency>

    <dependency>
      <groupId>jakarta.annotation</groupId>
      <artifactId>jakarta.annotation-api</artifactId>
      <version>3.0.0</version>
    </dependency>

    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-webmvc</artifactId>
    </dependency>

    <dependency>
      <groupId>tools.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>3.1.2</version>
      <optional>true</optional>
    </dependency>

    <dependency>
      <groupId>org.immutables</groupId>
      <artifactId>value</artifactId>
      <version>2.12.1</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.jspecify</groupId>
      <artifactId>jspecify</artifactId>
      <version>1.0.0</version>
      <scope>provided</scope>
    </dependency>

    <!-- TEST dependencies -->

    <dependency>
      <groupId>com.launchdarkly</groupId>
      <artifactId>okhttp-eventsource</artifactId>
      <version>4.3.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>5.23.0</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <version>4.0.5</version>
      <scope>test</scope>
    </dependency>

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
      <version>4.0.5</version>
      <scope>test</scope>
    </dependency>

  </dependencies>

  <build>
    <plugins>

      <plugin>
        <groupId>com.github.ekryd.sortpom</groupId>
        <artifactId>sortpom-maven-plugin</artifactId>
        <version>4.0.0</version>
        <configuration>
          <createBackupFile>false</createBackupFile>
          <expandEmptyElements>false</expandEmptyElements>
          <keepBlankLines>true</keepBlankLines>
          <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
          <sortDependencies>scope,groupId,artifactId</sortDependencies>
          <sortPlugins>groupId,artifactId</sortPlugins>
        </configuration>
      </plugin>

      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <version>5.0.0</version>
        <configuration>
          <licenseSets>
            <licenseSet>
              <header>${basedir}/src/main/config/header.txt</header>
              <excludes>
                <exclude>**/*.xml</exclude>
                <exclude>**/*.md</exclude>
                <exclude>**/*.py</exclude>
                <exclude>LICENSE</exclude>
                <exclude>.travis.yml</exclude>
                <exclude>**/.gitignore</exclude>
                <exclude>.factorypath</exclude>
                <exclude>.mvn/**/*</exclude>
                <exclude>mvnw.cmd</exclude>
                <exclude>mvnw</exclude>
                <exclude>.apt_generated/**</exclude>
                <exclude>.editorconfig</exclude>
                <exclude>Taskfile.yml</exclude>
                <exclude>.github/**</exclude>
              </excludes>
            </licenseSet>
          </licenseSets>
          <strictCheck>true</strictCheck>
        </configuration>
        <executions>
          <execution>
            <id>check-headers</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.spring.javaformat</groupId>
        <artifactId>spring-javaformat-maven-plugin</artifactId>
        <version>0.0.47</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-clean-plugin</artifactId>
        <version>3.5.0</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.15.0</version>
        <configuration>
          <source>17</source>
          <target>17</target>
          <release>17</release>
          <parameters>true</parameters>
          <annotationProcessorPaths>
            <path>
              <groupId>org.immutables</groupId>
              <artifactId>value</artifactId>
              <version>2.12.1</version>
            </path>
          </annotationProcessorPaths>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>3.1.4</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>3.6.2</version>
        <executions>
          <execution>
            <id>enforce-maven</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>3.6.3</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>3.1.4</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.5.0</version>
        <configuration>
          <archive>
            <manifestEntries>
              <Automatic-Module-Name>ch.rasc.sse.eventbus</Automatic-Module-Name>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.12.0</version>
        <configuration>
          <additionalOptions>-Xdoclint:none</additionalOptions>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.5.0</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.21.0</version>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>3.4.0</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar-no-fork</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.5.5</version>
        <configuration>
          <argLine>-Xshare:off -javaagent:${settings.localRepository}/org/mockito/mockito-core/5.23.0/mockito-core-5.23.0.jar</argLine>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.sonatype.central</groupId>
        <artifactId>central-publishing-maven-plugin</artifactId>
        <version>0.10.0</version>
        <extensions>true</extensions>
        <configuration>
          <publishingServerId>central</publishingServerId>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>error-prone</id>
      <activation>
        <jdk>[21,)</jdk>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
              <compilerArgs combine.children="append">
                <arg>-XDcompilePolicy=simple</arg>
                <arg>--should-stop=ifError=FLOW</arg>
                <arg>-XDaddTypeAnnotationsToSymbol=true</arg>
                <arg>-Xplugin:ErrorProne -Xep:NullAway:ERROR -Xep:FutureReturnValueIgnored:ERROR -Xep:StringSplitter:ERROR -Xep:CanonicalDuration:ERROR -Xep:InvalidLink:ERROR -Xep:UnrecognisedJavadocTag:ERROR -XepOpt:NullAway:OnlyNullMarked=true -XepOpt:NullAway:JSpecifyMode=true -XepOpt:NullAway:ExcludedClassAnnotations=org.immutables.value.Generated,javax.annotation.processing.Generated -XepExcludedPaths:.*/target/generated-sources/annotations/.*</arg>
              </compilerArgs>
              <annotationProcessorPaths combine.children="append">
                <path>
                  <groupId>com.google.errorprone</groupId>
                  <artifactId>error_prone_core</artifactId>
                  <version>2.49.0</version>
                </path>
                <path>
                  <groupId>com.uber.nullaway</groupId>
                  <artifactId>nullaway</artifactId>
                  <version>0.13.2</version>
                </path>
              </annotationProcessorPaths>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
