<?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>8.0.0.beta1</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>8.0.0.beta1</tag>
    <url>https://github.com/cometd/cometd</url>
  </scm>

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

  <distributionManagement>
    <repository>
      <id>oss.sonatype.org</id>
      <name>CometD Maven2 Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>oss.sonatype.org</id>
      <name>CometD Maven2 Snapshot Repository</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <properties>
    <dojo-version>1.17.3</dojo-version>
    <graalvm-version>23.0.2</graalvm-version>
    <jackson-version>2.16.0</jackson-version>
    <!-- tag::jetty-version[] -->
    <jetty-version>12.0.5</jetty-version>
    <!-- end::jetty-version[] -->
    <okhttp-version>4.12.0</okhttp-version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <slf4j-version>2.0.9</slf4j-version>
    <spring-boot-version>3.2.0</spring-boot-version>
    <spring-version>6.1.2</spring-version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.google.javascript</groupId>
        <artifactId>closure-compiler</artifactId>
        <version>v20231112</version>
      </dependency>
      <dependency>
        <groupId>jakarta.annotation</groupId>
        <artifactId>jakarta.annotation-api</artifactId>
        <!-- Must stay at 2.0.x for Jakarta EE 9 -->
        <version>2.1.1</version>
      </dependency>
      <dependency>
        <groupId>jakarta.inject</groupId>
        <artifactId>jakarta.inject-api</artifactId>
        <version>2.0.1</version>
      </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>jakarta.servlet</groupId>
        <artifactId>jakarta.servlet-api</artifactId>
        <version>6.0.0</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.websocket</groupId>
        <artifactId>jakarta.websocket-api</artifactId>
        <version>2.1.1</version>
        <scope>provided</scope>
      </dependency>
      <dependency>
        <groupId>jakarta.websocket</groupId>
        <artifactId>jakarta.websocket-client-api</artifactId>
        <version>2.1.1</version>
        <scope>provided</scope>
      </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.2.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>5.10.1</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>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>jetty-snapshot</id>
      <url>https://oss.sonatype.org/content/repositories/jetty-snapshots</url>
    </repository>
    <repository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>jetty-staging</id>
      <url>https://oss.sonatype.org/content/groups/jetty-with-staging</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>jetty-snapshot</id>
      <url>https://oss.sonatype.org/content/repositories/jetty-snapshots</url>
    </pluginRepository>
    <pluginRepository>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>jetty-staging</id>
      <url>https://oss.sonatype.org/content/groups/jetty-with-staging</url>
    </pluginRepository>
  </pluginRepositories>

  <build>
    <defaultGoal>install</defaultGoal>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          <version>2.41.1</version>
        </plugin>
        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>4.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.felix</groupId>
          <artifactId>maven-bundle-plugin</artifactId>
          <version>5.1.9</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.2.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>3.6.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>3.3.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.12.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>3.6.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>3.1.1</version>
          <configuration>
            <retryFailedDeploymentCount>8</retryFailedDeploymentCount>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>3.4.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>3.1.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>3.6.3</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>3.0.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.0.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>3.5.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.12.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>3.3.0</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>3.2.3</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>3.4.0</version>
        </plugin>
        <plugin>
          <groupId>org.asciidoctor</groupId>
          <artifactId>asciidoctor-maven-plugin</artifactId>
          <version>2.2.4</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>3.1.1</version>
        </plugin>
        <plugin>
          <groupId>org.eclipse.jetty.ee10</groupId>
          <artifactId>jetty-ee10-maven-plugin</artifactId>
          <version>${jetty-version}</version>
        </plugin>
        <plugin>
          <groupId>org.jacoco</groupId>
          <artifactId>jacoco-maven-plugin</artifactId>
          <version>0.8.11</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>com.diffplug.spotless</groupId>
        <artifactId>spotless-maven-plugin</artifactId>
        <version>2.39.0</version>
        <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/dojo/**/*.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>
          <properties>
            <copyright-range>${project.inceptionYear}-2022</copyright-range>
          </properties>
          <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>
  </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>
