<?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.aarboard.nextcloud</groupId>
	<artifactId>nextcloud-api</artifactId>
	<version>14.2.2</version>
	<packaging>jar</packaging>
	<properties>
		<!-- compile time dependencies -->
		<httpcore.version>4.4.16</httpcore.version>
		<httpasyncclient.version>4.1.5</httpasyncclient.version>
		<httpclient.version>4.5.14</httpclient.version>
		<slf4j-api.version>2.0.18</slf4j-api.version>
		<sardine.version>5.13</sardine.version>
		<commons-io.version>2.22.0</commons-io.version>
		<commons-lang3.version>3.20.0</commons-lang3.version>
		<commons-codec.version>1.22.1</commons-codec.version>
		<jackson.version>2.22.2</jackson.version>
		<jakarta.xml.bind-api.version>4.0.5</jakarta.xml.bind-api.version>
		<!-- Jakarta Annotations 3.0 is the Jakarta EE 11 release but is still
		     built for Java 11 (verified: bytecode major 55 and an OSGi
		     Require-Capability of osgi.ee=JavaSE version=11), so it runs on our
		     JDK 11 baseline. Versus 2.1.1 it only drops the deprecated
		     jakarta.annotation.ManagedBean. -->
		<jakarta-annotation-api.version>3.0.0</jakarta-annotation-api.version>
		<jaxb-impl.version>4.0.9</jaxb-impl.version>
		<!-- test dependencies versions -->
		<skipTests>true</skipTests>
		<slf4j-simple.version>${slf4j-api.version}</slf4j-simple.version>
		<jaxb-runtime.version>4.0.9</jaxb-runtime.version>
		<junit.version>4.13.2</junit.version>
		<!-- Testcontainers 2.x is built with release=8 for its published classes
		     (verified: no bytecode above major 52 outside the multi-release
		     META-INF/versions overlays), so it runs on our JDK 11 baseline even
		     though upstream only runs its own CI on Java 17/21. -->
		<testcontainers.version>2.0.5</testcontainers.version>
		<!-- build environment versions -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
		<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
		<maven-release-plugin.version>3.3.1</maven-release-plugin.version>
		<maven-resources-plugin.version>3.5.0</maven-resources-plugin.version>
		<buildnumber-maven-plugin.version>3.3.0</buildnumber-maven-plugin.version>
		<templating-maven-plugin.version>3.1.0</templating-maven-plugin.version>
		<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
		<central-publishing-maven-plugin.version>0.11.0</central-publishing-maven-plugin.version>
		<maven-source-plugin.version>3.4.0</maven-source-plugin.version>
		<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
		<maven-scm-provider-gitexe.version>2.2.1</maven-scm-provider-gitexe.version>
		<maven-surefire-plugin.version>3.5.6</maven-surefire-plugin.version>
		<cyclonedx-maven-plugin.version>2.9.3</cyclonedx-maven-plugin.version>
		<jacoco-maven-plugin.version>0.8.15</jacoco-maven-plugin.version>
		<maven.compiler.source>11</maven.compiler.source>
		<maven.compiler.target>11</maven.compiler.target>
		<netbeans.hint.license>gpl30</netbeans.hint.license>
	</properties>
	<name>NextCloud Java API library</name>
	<description>Java api library to access nextcloud features from java applications</description>
	<url>https://github.com/a-schild/nextcloud-java-api</url>
	<licenses>
		<license>
			<name>The Apache License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
		</license>
	</licenses>
	<developers>
		<developer>
			<name>Andre Schild</name>
			<email>a.schild@aarboard.ch</email>
			<organization>Aarboard AG</organization>
			<organizationUrl>https://www.aarboard.ch</organizationUrl>
		</developer>
	</developers>
	<dependencies>
		<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpcore</artifactId>
			<version>${httpcore.version}</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpasyncclient</artifactId>
			<version>${httpasyncclient.version}</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>${httpclient.version}</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j-api.version}</version>
		</dependency>
		<dependency>
			<groupId>com.github.lookfirst</groupId>
			<artifactId>sardine</artifactId>
			<version>${sardine.version}</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>${commons-codec.version}</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>${commons-io.version}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>${commons-lang3.version}</version>
		</dependency>
		<dependency>
			<groupId>jakarta.xml.bind</groupId>
			<artifactId>jakarta.xml.bind-api</artifactId>
			<version>${jakarta.xml.bind-api.version}</version>
		</dependency>
		<dependency>
			<groupId>jakarta.annotation</groupId>
			<artifactId>jakarta.annotation-api</artifactId>
			<version>${jakarta-annotation-api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-runtime</artifactId>
			<version>${jaxb-runtime.version}</version>
		</dependency>
		<dependency>
			<groupId>com.fasterxml.jackson.core</groupId>
			<artifactId>jackson-databind</artifactId>
			<version>${jackson.version}</version>
		</dependency>
		<!-- Test dependencies -->
		<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-simple -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>${slf4j-simple.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- JAXB RI, Jakarta XML Binding -->
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-impl</artifactId>
			<version>${jaxb-impl.version}</version>
			<scope>test</scope>
		</dependency>
		<!-- Spins up a throw-away Nextcloud server for the integration tests -->
		<dependency>
			<groupId>org.testcontainers</groupId>
			<artifactId>testcontainers</artifactId>
			<version>${testcontainers.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<scm>
		<connection>scm:git:https://github.com/a-schild/nextcloud-java-api.git</connection>
		<url>https://github.com/a-schild/nextcloud-java-api</url>
		<tag>HEAD</tag>
	</scm>
	<distributionManagement>
		<!-- Only used for -SNAPSHOT versions; releases go through the Central
		     Portal via the central-publishing-maven-plugin. The id must match the
		     server id the publish workflows set up (central). -->
		<snapshotRepository>
			<id>central</id>
			<name>Central Portal Snapshots</name>
			<url>https://central.sonatype.com/repository/maven-snapshots/</url>
		</snapshotRepository>
	</distributionManagement>
	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.sonatype.central</groupId>
						<artifactId>central-publishing-maven-plugin</artifactId>
						<version>${central-publishing-maven-plugin.version}</version>
						<extensions>true</extensions>
						<configuration>
							<publishingServerId>central</publishingServerId>
							<autoPublish>true</autoPublish>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>${maven-source-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<phase>verify</phase>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>${maven-javadoc-plugin.version}</version>
						<executions>
							<execution>
								<id>attach-javadoc</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<stylesheet>java</stylesheet>
							<doclint>none</doclint>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- GPG Signature on release -->
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<gpgArguments>
								<arg>--pinentry-mode</arg>
								<arg>loopback</arg>
							</gpgArguments>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.cyclonedx</groupId>
						<artifactId>cyclonedx-maven-plugin</artifactId>
						<version>${cyclonedx-maven-plugin.version}</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>makeAggregateBom</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<projectType>library</projectType>
							<schemaVersion>1.4</schemaVersion>
							<includeBomSerialNumber>true</includeBomSerialNumber>
							<includeCompileScope>true</includeCompileScope>
							<includeProvidedScope>true</includeProvidedScope>
							<includeRuntimeScope>true</includeRuntimeScope>
							<includeSystemScope>true</includeSystemScope>
							<includeTestScope>false</includeTestScope>
							<includeLicenseText>false</includeLicenseText>
							<outputReactorProjects>true</outputReactorProjects>
							<outputFormat>all</outputFormat>
							<outputName>nextcloud-api-${project.version}-sbom</outputName>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
					<source>${maven.compiler.source}</source>
					<target>${maven.compiler.target}</target>
					<testSource>${maven.compiler.source}</testSource>
					<testTarget>${maven.compiler.target}</testTarget>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<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>buildnumber-maven-plugin</artifactId>
				<version>${buildnumber-maven-plugin.version}</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<doCheck>false</doCheck>
					<doUpdate>false</doUpdate>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>templating-maven-plugin</artifactId>
				<version>${templating-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>generate-verion-class</id>
						<goals>
							<goal>filter-sources</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>${maven-deploy-plugin.version}</version>
				<executions>
					<execution>
						<id>default-deploy</id>
						<phase>deploy</phase>
						<goals>
							<goal>deploy</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>${maven-release-plugin.version}</version>
				<configuration>
					<localCheckout>true</localCheckout>
					<pushChanges>false</pushChanges>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.apache.maven.scm</groupId>
						<artifactId>maven-scm-provider-gitexe</artifactId>
						<version>${maven-scm-provider-gitexe.version}</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.sonatype.central</groupId>
				<artifactId>central-publishing-maven-plugin</artifactId>
				<version>${central-publishing-maven-plugin.version}</version>
				<extensions>true</extensions>
				<configuration>
					<publishingServerId>ossrh</publishingServerId>
					<tokenAuth>true</tokenAuth>
					<autoPublish>true</autoPublish>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>verify</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<configuration>
					<source>11</source>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-gpg-plugin</artifactId>
				<version>${maven-gpg-plugin.version}</version>
				<executions>
					<execution>
						<id>sign-artifacts</id>
						<phase>verify</phase>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
				<configuration>
					<skipTests>${skipTests}</skipTests>
					<systemProperties>
						<property>
							<name>nextcloud.api.test.servername</name>
							<value>${nextcloud.api.test.servername}</value>
						</property>
						<property>
							<name>nextcloud.api.test.serverport</name>
							<value>${nextcloud.api.test.serverport}</value>
						</property>
						<property>
							<name>nextcloud.api.test.username</name>
							<value>${nextcloud.api.test.username}</value>
						</property>
						<property>
							<name>nextcloud.api.test.password</name>
							<value>${nextcloud.api.test.password}</value>
						</property>
					</systemProperties>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>${jacoco-maven-plugin.version}</version>
				<executions>
					<execution>
						<id>prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
					<execution>
						<id>report</id>
						<phase>verify</phase>
						<goals>
							<goal>report</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.cyclonedx</groupId>
				<artifactId>cyclonedx-maven-plugin</artifactId>
				<version>${cyclonedx-maven-plugin.version}</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>makeAggregateBom</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<projectType>library</projectType>
					<schemaVersion>1.4</schemaVersion>
					<includeBomSerialNumber>true</includeBomSerialNumber>
					<includeCompileScope>true</includeCompileScope>
					<includeProvidedScope>true</includeProvidedScope>
					<includeRuntimeScope>true</includeRuntimeScope>
					<includeSystemScope>true</includeSystemScope>
					<includeTestScope>false</includeTestScope>
					<includeLicenseText>false</includeLicenseText>
					<outputReactorProjects>true</outputReactorProjects>
					<outputFormat>all</outputFormat>
					<outputName>nextcloud-api-${project.version}-sbom</outputName>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>
