<?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>
  <groupId>org.cometd</groupId>
  <artifactId>cometd-project</artifactId>
  <version>9.0.0</version>
  <packaging>pom</packaging>
  <name>CometD</name>
  <description>The CometD project is a scalable web messaging bus that uses WebSocket
    and HTTP AJAX push technology patterns known as "Comet" techniques</description>

  <url>https://cometd.org</url>

  <inceptionYear>2008</inceptionYear>

  <organization>
    <name>The CometD Project</name>
    <url>https://cometd.org</url>
  </organization>

  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>gregw</id>
      <name>Greg Wilkins</name>
      <email>gregw@webtide.com</email>
      <organization>Webtide</organization>
      <organizationUrl>https://www.webtide.com</organizationUrl>
    </developer>
    <developer>
      <id>sbordet</id>
      <name>Simone Bordet</name>
      <email>sbordet@webtide.com</email>
      <organization>Webtide</organization>
      <organizationUrl>https://www.webtide.com</organizationUrl>
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>CometD Dev List</name>
      <archive>https://groups.google.com/group/cometd-dev/</archive>
    </mailingList>
    <mailingList>
      <name>CometD User List</name>
      <archive>https://groups.google.com/group/cometd-users/</archive>
    </mailingList>
  </mailingLists>

  <modules>
    <module>cometd-archetypes</module>
    <module>cometd-demo</module>
    <module>cometd-documentation</module>
    <module>cometd-java</module>
    <module>cometd-javascript</module>
    <module>cometd-distribution</module>
  </modules>

  <scm>
    <connection>scm:git:git://github.com/cometd/cometd.git</connection>
    <developerConnection>scm:git:ssh://git@github.com/cometd/cometd.git</developerConnection>
    <tag>9.0.0</tag>
    <url>https://github.com/cometd/cometd</url>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://bugs.cometd.org</url>
  </issueManagement>

  <distributionManagement>
    <repository>
      <id>sonatype-cp</id>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-cp</id>
      <url>https://central.sonatype.com/repository/maven-snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <detectOfflineLinks>false</detectOfflineLinks>
    <graalvm-version>25.0.0</graalvm-version>
    <jackson-version>2.20.0</jackson-version>
    <jakarta-ee-version>11.0.0</jakarta-ee-version>
    <!-- tag::jetty-version[] -->
    <jetty-version>12.1.2</jetty-version>
    <!-- end::jetty-version[] -->
    <maven-compiler-plugin-version>3.14.1</maven-compiler-plugin-version>
    <maven-war-plugin-version>3.4.0</maven-war-plugin-version>
    <njord.autoPublish>true</njord.autoPublish>
    <njord.version>0.8.4</njord.version>
    <okhttp-version>5.2.1</okhttp-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <slf4j-version>2.0.17</slf4j-version>
    <spring-boot-version>3.5.6</spring-boot-version>
    <spring-version>6.2.11</spring-version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>jakarta.platform</groupId>
        <artifactId>jakarta.jakartaee-bom</artifactId>
        <version>${jakarta-ee-version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty.toolchain</groupId>
        <artifactId>jetty-perf-helper</artifactId>
        <version>1.0.7</version>
      </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j-version}</version>
      </dependency>
      <dependency>
        <groupId>com.google.inject</groupId>
        <artifactId>guice</artifactId>
        <version>7.0.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.awaitility</groupId>
        <artifactId>awaitility</artifactId>
        <version>4.3.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-slf4j-impl</artifactId>
        <version>${jetty-version}</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.junit.jupiter</groupId>
        <artifactId>junit-jupiter</artifactId>
        <version>6.0.0</version>
        <scope>test</scope>
      </dependency>
      <dependency>
        <groupId>org.openjdk.jmh</groupId>
        <artifactId>jmh-generator-annprocess</artifactId>
        <version>1.37</version>
        <scope>test</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.awaitility</groupId>
      <artifactId>awaitility</artifactId>
    </dependency>
    <dependency>
      <groupId>org.eclipse.jetty</groupId>
      <artifactId>jetty-slf4j-impl</artifactId>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter</artifactId>
    </dependency>
  </dependencies>

  <repositories>
    <repository>
      <id>staging</id>
      <url>http://localhost:8081/repository/release-staging/</url>
    </repository>
  </repositories>

  <build>
    <defaultGoal>install</defaultGoal>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <version>3.0.0</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>5.0.0</version>
        </plugin>
        <plugin>
          <groupId>eu.maveniverse.maven.plugins</groupId>
          <artifactId>njord</artifactId>
          <version>${njord.version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>6.0.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-archetype-plugin</artifactId>
          <version>3.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.7.1</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>${maven-compiler-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.9.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.1.4</version>
          <configuration>
            <retryFailedDeploymentCount>8</retryFailedDeploymentCount>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.6.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.2.8</version>
        </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.4.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.12.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>3.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-scm-plugin</artifactId>
          <version>2.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.6.1</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.3.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.5.4</version>
          <configuration>
            <argLine>@{argLine} -showversion -Xmx1g -Xms1g -Xlog:gc* -XX:+PrintCommandLineFlags</argLine>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>${maven-war-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.asciidoctor</groupId>
          <artifactId>asciidoctor-maven-plugin</artifactId>
          <version>3.2.0</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>3.6.1</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.jetty.ee11</groupId>
          <artifactId>jetty-ee11-maven-plugin</artifactId>
          <version>${jetty-version}</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.13</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <configuration>
          <pom>
            <includes>
              <include>pom.xml</include>
            </includes>
            <sortPom>
              <expandEmptyElements>false</expandEmptyElements>
              <nrOfIndentSpace>2</nrOfIndentSpace>
              <predefinedSortOrder>recommended_2008_06</predefinedSortOrder>
              <sortDependencies>scope,groupId,artifactId</sortDependencies>
              <sortDependencyExclusions>groupId,artifactId</sortDependencyExclusions>
              <sortExecutions>true</sortExecutions>
              <sortModules>false</sortModules>
              <sortPlugins>groupId,artifactId</sortPlugins>
              <sortProperties>true</sortProperties>
              <spaceBeforeCloseEmptyElement>true</spaceBeforeCloseEmptyElement>
            </sortPom>
          </pom>
          <upToDateChecking>
            <enabled>true</enabled>
          </upToDateChecking>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>validate</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <inherited>false</inherited>
        <configuration>
          <licenseSets>
            <licenseSet>
              <header>copyright-header.txt</header>
              <includes>
                <include>**/*.java</include>
                <include>cometd-javascript/common/**/cometd-header.js</include>
                <include>cometd-javascript/jquery/**/*.js</include>
              </includes>
              <excludes>
                <exclude>cometd-archetypes/**</exclude>
                <exclude>**/overlays/**</exclude>
                <exclude>cometd-javascript/jquery/**/jquery-*.js</exclude>
              </excludes>
            </licenseSet>
          </licenseSets>
          <aggregate>true</aggregate>
          <failIfMissing>true</failIfMissing>
          <strictCheck>true</strictCheck>
          <mapping>
            <java>SLASHSTAR_STYLE</java>
          </mapping>
        </configuration>
        <executions>
          <execution>
            <id>check-headers</id>
            <goals>
              <goal>check</goal>
            </goals>
            <phase>verify</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <extensions>true</extensions>
        <configuration>
          <archive>
            <addMavenDescriptor>true</addMavenDescriptor>
          </archive>
          <supportedProjectTypes>
            <supportedProjectType>jar</supportedProjectType>
            <supportedProjectType>war</supportedProjectType>
          </supportedProjectTypes>
          <instructions>
            <Bundle-Vendor>${project.organization.name}</Bundle-Vendor>
            <Bundle-Description>${project.description}</Bundle-Description>
            <Bundle-DocURL>https://docs.cometd.org</Bundle-DocURL>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Bundle-Version>${project.version}</Bundle-Version>
            <Import-Package>org.eclipse.jetty.*;version="[12,13)",*</Import-Package>
          </instructions>
        </configuration>
        <executions>
          <execution>
            <id>osgi</id>
            <goals>
              <goal>manifest</goal>
            </goals>
            <phase>process-classes</phase>
            <inherited>true</inherited>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>17</source>
          <target>17</target>
          <release>17</release>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
          <compilerArgument>-Xlint:all,-serial,-missing-explicit-ctor</compilerArgument>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <inherited>false</inherited>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireJavaVersion>
                  <version>[17,)</version>
                </requireJavaVersion>
                <requireMavenVersion>
                  <version>[3.9,)</version>
                </requireMavenVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
            <manifestEntries>
              <Implementation-Version>${project.version}</Implementation-Version>
              <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <arguments>-DskipTests</arguments>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <goals>deploy</goals>
          <preparationGoals>clean install</preparationGoals>
          <mavenExecutorId>forked-path</mavenExecutorId>
          <useReleaseProfile>true</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <tagNameFormat>@{project.version}</tagNameFormat>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>jacoco-initialize</id>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <phase>initialize</phase>
          </execution>
          <execution>
            <id>jacoco-report</id>
            <goals>
              <goal>report</goal>
            </goals>
            <phase>package</phase>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <extensions>
      <extension>
        <groupId>eu.maveniverse.maven.njord</groupId>
        <artifactId>extension3</artifactId>
        <version>${njord.version}</version>
      </extension>
    </extensions>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
                <phase>verify</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
