<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.diozero</groupId>
	<artifactId>diozero-bom</artifactId>
	<packaging>pom</packaging>
	<version>1.4.1</version>
	<name>diozero - Bill of Materials</name>
	<description>Java Device I/O library that is portable across Single Board Computers (including Raspberry Pi, BeagleBone Black, Odroid C2, CHIP, ASUS TinkerBoard, Allwinner H3 / H5 / H6)</description>
	<url>https://www.diozero.com/</url>
	<inceptionYear>2016</inceptionYear>

	<organization>
		<name>diozero</name>
		<url>https://www.diozero.com</url>
	</organization>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>https://opensource.org/licenses/MIT</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<name>Sonatype Open Source Maven Snapshots Repository</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<name>Sonatype Open Source Maven Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<scm>
		<connection>scm:git:https://github.com/mattjlewis/diozero.git</connection>
		<developerConnection>scm:git:https://github.com/mattjlewis/diozero.git</developerConnection>
		<url>https://github.com/mattjlewis/diozero</url>
		<tag>HEAD</tag>
	</scm>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

		<project.scm.id>github</project.scm.id>
		<github.global.server>github</github.global.server>

		<maven.min-version>3.3.0</maven.min-version>

		<diozero.version>1.4.1</diozero.version>

		<!-- Java version -->
		<maven.compiler.source>11</maven.compiler.source>
		<maven.compiler.release>11</maven.compiler.release>

		<!-- Maven plugins -->
		<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
		<maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
		<maven-javadoc-plugin.version>3.10.1</maven-javadoc-plugin.version>
		<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
		<maven-shade-plugin.version>3.6.0</maven-shade-plugin.version>
		<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
		<maven-install-plugin.version>3.1.2</maven-install-plugin.version>
		<maven-deploy-plugin.version>3.1.2</maven-deploy-plugin.version>
		<maven-gpg-plugin.version>3.2.7</maven-gpg-plugin.version>
		<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
		<maven-surefire-plugin.version>3.5.1</maven-surefire-plugin.version>

		<!-- Other plugins -->
		<nexus-staging-maven-plugin.version>1.7.0</nexus-staging-maven-plugin.version>
		<license-maven-plugin.version>2.4.0</license-maven-plugin.version>
		<versions-maven-plugin.version>2.17.1</versions-maven-plugin.version>
		<exec-maven-plugin.version>3.4.1</exec-maven-plugin.version>
		<eclipse.m2e.lifecycle-mapping.version>1.0.0</eclipse.m2e.lifecycle-mapping.version>

		<!-- Libraries -->
		<tinylog.version>2.7.0</tinylog.version>
		<hipparchus.version>3.1</hipparchus.version>
		<eclipse-paho-client-mqttv3.version>1.2.5</eclipse-paho-client-mqttv3.version>
		<google-gson.version>2.11.0</google-gson.version>
		<google-protobuf-java.version>4.28.2</google-protobuf-java.version>
		<netty.version>4.1.114.Final</netty.version>
		<grpc.version>1.68.0</grpc.version>
		<junit.version>5.11.2</junit.version>
		<mockito.version>5.14.1</mockito.version>
	</properties>

	<!-- Prepare common library versions -->
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.tinylog</groupId>
				<artifactId>tinylog-api</artifactId>
				<version>${tinylog.version}</version>
			</dependency>
			<dependency>
				<groupId>org.tinylog</groupId>
				<artifactId>tinylog-impl</artifactId>
				<version>${tinylog.version}</version>
				<exclusions>
					<exclusion>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>animal-sniffer-annotations</artifactId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>com.diozero</groupId>
				<artifactId>diozero-core</artifactId>
				<version>${diozero.version}</version>
			</dependency>
			<dependency>
				<groupId>com.diozero</groupId>
				<artifactId>diozero-provider-mock</artifactId>
				<version>${diozero.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hipparchus</groupId>
				<artifactId>hipparchus-geometry</artifactId>
				<version>${hipparchus.version}</version>
			</dependency>
			<dependency>
				<groupId>org.hipparchus</groupId>
				<artifactId>hipparchus-filtering</artifactId>
				<version>${hipparchus.version}</version>
			</dependency>
			<dependency>
				<groupId>org.eclipse.paho</groupId>
				<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
				<version>${eclipse-paho-client-mqttv3.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.code.gson</groupId>
				<artifactId>gson</artifactId>
				<version>${google-gson.version}</version>
			</dependency>
			<dependency>
				<groupId>com.google.protobuf</groupId>
				<artifactId>protobuf-java</artifactId>
				<version>${google-protobuf-java.version}</version>
			</dependency>
			<dependency>
				<groupId>io.netty</groupId>
				<artifactId>netty-transport</artifactId>
				<version>${netty.version}</version>
			</dependency>
			<dependency>
				<groupId>io.netty</groupId>
				<artifactId>netty-codec</artifactId>
				<version>${netty.version}</version>
			</dependency>
			<dependency>
				<groupId>org.junit</groupId>
				<artifactId>junit-bom</artifactId>
				<version>${junit.version}</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${mockito.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<!-- Dependencies common to all diozero projects -->
	<dependencies>
		<dependency>
			<groupId>org.tinylog</groupId>
			<artifactId>tinylog-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.tinylog</groupId>
			<artifactId>tinylog-impl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<developers>
		<developer>
			<id>mattjlewis</id>
			<name>Matthew Lewis</name>
			<email>deviceiozero@gmail.com</email>
			<url>https://github.com/mattjlewis</url>
		</developer>
	</developers>

	<build>
		<!-- Prepare common plugin versions -->
		<pluginManagement>
			<plugins>
				<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-surefire-plugin</artifactId>
					<version>${maven-surefire-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${maven-jar-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-assembly-plugin</artifactId>
					<version>${maven-assembly-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>${maven-shade-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${maven-source-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${maven-javadoc-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${maven-gpg-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${maven-install-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${maven-deploy-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${maven-release-plugin.version}</version>
				</plugin>

				<!-- Other plugins -->
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${nexus-staging-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<version>${license-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>versions-maven-plugin</artifactId>
					<version>${versions-maven-plugin.version}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>exec-maven-plugin</artifactId>
					<version>${exec-maven-plugin.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<!-- Setup the Maven Java compiler plugin -->
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<debug>false</debug>
					<showDeprecation>true</showDeprecation>
					<showWarnings>true</showWarnings>
					<excludes>
						<exclude>**/package-info.java</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifest>
							<addClasspath>true</addClasspath>
						</manifest>
						<addMavenDescriptor>false</addMavenDescriptor>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<serverId>ossrh</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<configuration>
					<autoVersionSubmodules>true</autoVersionSubmodules>
					<!-- <useReleaseProfile>true</useReleaseProfile> -->
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy</goals>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<profiles>

		<profile>
			<id>snapshot</id>
			<activation>
				<property>
					<name>snapshot-build</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<!-- <goal>jar</goal> -->
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<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>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<!-- <phase>deploy</phase> -->
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<configuration>
							<licenseName>mit</licenseName>
							<verbose>false</verbose>
							<descriptionTemplate>src/licence/descriptionTemplate.ftl</descriptionTemplate>
							<canUpdateCopyright>true</canUpdateCopyright>
							<canUpdateDescription>true</canUpdateDescription>
							<canUpdateLicense>true</canUpdateLicense>
							<emptyLineAfterHeader>true</emptyLineAfterHeader>
							<roots>
								<root>src/main/java</root>
								<root>src/test/java</root>
								<root>src/main/native</root>
								<root>src/main/c</root>
							</roots>
							<excludes>
								<exclude>**/*.ftl</exclude>
								<exclude>**/*.h</exclude>
								<exclude>**/*.sh</exclude>
								<exclude>**/*.json</exclude>
							</excludes>
						</configuration>
						<executions>
							<execution>
								<id>append-license-file-headers</id>
								<goals>
									<goal>update-file-header</goal>
								</goals>
								<phase>process-sources</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>release</id>
			<activation>
				<property>
					<name>release-build</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<!-- <goal>jar</goal> -->
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<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>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<!-- <phase>deploy</phase> -->
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
								<configuration>
									<gpgArguments>
										<arg>--pinentry-mode</arg>
										<arg>loopback</arg>
									</gpgArguments>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>license-maven-plugin</artifactId>
						<configuration>
							<licenseName>mit</licenseName>
							<verbose>false</verbose>
							<descriptionTemplate>src/licence/descriptionTemplate.ftl</descriptionTemplate>
							<canUpdateCopyright>true</canUpdateCopyright>
							<canUpdateDescription>true</canUpdateDescription>
							<canUpdateLicense>true</canUpdateLicense>
							<emptyLineAfterHeader>true</emptyLineAfterHeader>
							<roots>
								<root>src/main/java</root>
								<root>src/test/java</root>
								<root>src/main/native</root>
								<root>src/main/c</root>
							</roots>
							<excludes>
								<exclude>**/*.ftl</exclude>
								<exclude>**/*.h</exclude>
								<exclude>**/*.sh</exclude>
								<exclude>**/*.json</exclude>
							</excludes>
						</configuration>
						<executions>
							<execution>
								<id>append-license-file-headers</id>
								<goals>
									<goal>update-file-header</goal>
								</goals>
								<phase>process-sources</phase>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
