<?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>ch.exense.streaming</groupId>
	<artifactId>step-streaming</artifactId>
	<version>1.0.0</version>
	<packaging>pom</packaging>

	<!-- required metadata for maven central -->
	<name>${project.groupId}:${project.artifactId}</name>
	<description>Step Streaming</description>
	<url>https://github.com/exense/step-streaming</url>

	<licenses>
		<license>
			<name>The GNU Affero General Public License, Version 3</name>
			<url>https://www.gnu.org/licenses/#AGPL</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Exense GmbH</name>
			<organization>Exense GmbH</organization>
			<organizationUrl>https://exense.ch</organizationUrl>
			<email>support@exense.ch</email>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:https://github.com/exense/step-streaming.git</connection>
		<developerConnection>scm:git:https://github.com/exense/step-streaming.git</developerConnection>
		<url>https://github.com/exense/step-streaming</url>
	</scm>
	<!-- metadata end -->

	<!-- Reminder: don't forget to add all modules to the end of the dependencyManagement section just below, for export -->
	<modules>
		<module>step-streaming-api-common</module>
		<module>step-streaming-api-client-upload</module>
		<module>step-streaming-api-client-download</module>
		<module>step-streaming-api-server</module>
		<module>step-streaming-impl-common</module>
		<module>step-streaming-impl-server</module>
		<module>step-streaming-impl-websocket</module>
	</modules>
	<repositories>
		<!-- staging nexus -->
		<repository>
			<id>nexus-staging</id>
			<url>https://nexus-enterprise.exense.ch/repository/staging-maven/</url>
		</repository>
	</repositories>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven.compiler.source>11</maven.compiler.source>
		<maven.compiler.target>11</maven.compiler.target>
		<maven.compiler.release>11</maven.compiler.release>

		<!-- All dependencies should be resolvable from here, without further specifying versions -->
		<dependencies.version>2025.6.25</dependencies.version>

		<!-- Maven build modules versions -->
		<dep.mvn.compiler.version>3.14.0</dep.mvn.compiler.version>
		<dep.mvn.jar.version>3.4.2</dep.mvn.jar.version>
		<dep.mvn.jacoco.version>0.8.12</dep.mvn.jacoco.version>
		<dep.mvn.deploy.version>3.0.0-M1</dep.mvn.deploy.version>
		<dep.mvn.surefire.version>3.2.5</dep.mvn.surefire.version>
		<dep.mvn.javadoc.version>3.3.2</dep.mvn.javadoc.version> <!-- newest: 3.7.0 -->
		<dep.mvn.source.version>3.0.1</dep.mvn.source.version> <!-- newest: 3.3.1 -->
		<dep.mvn.gpg.version>1.6</dep.mvn.gpg.version>
		<dep.mvn.dependency-check.version>10.0.3</dep.mvn.dependency-check.version>
	</properties>

	<!-- available dependencies, can/should be used in modules and dependent projects WITHOUT specifying a version number -->
	<dependencyManagement>
		<dependencies>
			<!-- IMPORTED dependencies -->
			<dependency>
				<groupId>ch.exense.dependencies</groupId>
				<artifactId>dependencies-logging</artifactId>
				<version>${dependencies.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>ch.exense.dependencies</groupId>
				<artifactId>dependencies-junit</artifactId>
				<version>${dependencies.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>ch.exense.dependencies</groupId>
				<artifactId>dependencies-jackson</artifactId>
				<version>${dependencies.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>ch.exense.dependencies</groupId>
				<artifactId>dependencies-jakarta</artifactId>
				<version>${dependencies.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>ch.exense.dependencies</groupId>
				<artifactId>dependencies-jetty</artifactId>
				<version>${dependencies.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>

			<!-- EXPORTED dependencies, basically a BOM for exporting our own modules -->
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-api-common</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-api-server</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-api-client-upload</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-api-client-download</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-impl-common</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-impl-server</artifactId>
				<version>${project.version}</version>
			</dependency>
			<!-- not sure if this non-leaf submodule is really needed for export, but it doesn't harm -->
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-impl-websocket</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-impl-websocket-common</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-impl-websocket-server</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-impl-websocket-client-upload</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>ch.exense.streaming</groupId>
				<artifactId>step-streaming-impl-websocket-client-download</artifactId>
				<version>${project.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<!-- Test dependencies are specified here so they're available in all modules. -->
		<!-- "Actual" (compile/run) dependencies are specified in the appropriate modules,
		as they're transitively available in referencing projects/modules -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${dep.mvn.compiler.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${dep.mvn.jar.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${dep.mvn.deploy.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${dep.mvn.source.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${dep.mvn.javadoc.version}</version>
				</plugin>
				<plugin>
					<groupId>org.jacoco</groupId>
					<artifactId>jacoco-maven-plugin</artifactId>
					<version>${dep.mvn.jacoco.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${dep.mvn.surefire.version}</version>
					<dependencies>
						<dependency>
							<groupId>org.apache.maven.surefire</groupId>
							<artifactId>surefire-junit47</artifactId>
							<version>${dep.mvn.surefire.version}</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.owasp</groupId>
					<artifactId>dependency-check-maven</artifactId>
					<version>${dep.mvn.dependency-check.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${dep.mvn.gpg.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>default-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>default-report</id>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<systemPropertyVariables>
						<logback.configurationFile>${basedir}/../logback-maven.xml</logback.configurationFile>
					</systemPropertyVariables>
				</configuration>
			</plugin>
			<!-- Source -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- Javadoc -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<header><![CDATA[<meta name='viewport' content='width=device-width, initial-scale=1.0'>]]></header>
					<!-- detectLinks MUST NOT be set to true in a production context, as it derives random domain names
                    from package names, then tries to download data from those random URLs. -->
					<detectLinks>false</detectLinks>

					<!-- detectOfflineLinks SHOULD also be set to false, because:  -->
					<!-- a) it cannot generate meaningful links to the javadoc from other projects, anyway -->
					<!-- b) it causes unnecessarily scary ERROR messages at build time  -->
					<detectOfflineLinks>false</detectOfflineLinks>

					<quiet>true</quiet>
					<source>11</source>
					<additionalOptions>
						<additionalOption>-Xdoclint:none</additionalOption>
					</additionalOptions>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<!-- Skip javadoc generation -->
			<id>SkipJavadoc</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<maven.javadoc.skip>true</maven.javadoc.skip>
			</properties>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-surefire-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>SignedBuild</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<!-- Signature -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>

					<!-- Disable old maven-deploy plugin -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>

					<!-- Publish directly to central instead -->
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<version>0.8.0</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>sonatype</publishingServerId>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>