<?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>com.zsmartsystems</groupId>
	<artifactId>zigbee</artifactId>
	<version>1.4.16</version>
	<packaging>pom</packaging>

	<name>ZssBee</name>
	<description>Open Source ZigBee Framework</description>
	<url>https://github.com/zsmartsystems/com.zsmartsystems.zigbee</url>
	<licenses>
		<license>
			<name>Eclipse Public License, Version 1.0</name>
			<url>https://www.eclipse.org/legal/epl-v10.html</url>
			<distribution>repo</distribution>
			<comments>A business-friendly OSS license</comments>
		</license>
	</licenses>
	<organization>
		<name>Z-Smart Systems</name>
		<url>http://www.zsmartsystems.com</url>
	</organization>
	<developers>
		<developer>
			<id>cdjackson</id>
			<name>Chris Jackson</name>
			<email>chris@zsmartsystems.com</email>
			<url>http://www.zsmartsystems.com</url>
			<organization>Z-Smart Systems</organization>
			<organizationUrl>http://www.zsmartsystems.com</organizationUrl>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<license.year>2024</license.year>
		<source.version>1.8</source.version>
		<target.version>1.8</target.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<slf4j.version>2.0.16</slf4j.version>
		<log4j.version>1.2.17</log4j.version>
		<animal.sniffer.version>1.23</animal.sniffer.version>
		<error-prone.version>2.10.0</error-prone.version>
	</properties>

	<scm>
		<url>https://github.com/zsmartsystems/com.zsmartsystems.zigbee.git</url>
		<connection>scm:git:https://github.com/zsmartsystems/com.zsmartsystems.zigbee.git</connection>
		<developerConnection>scm:git:https://github.com/zsmartsystems/com.zsmartsystems.zigbee.git</developerConnection>
		<tag>zigbee-1.4.16</tag>
	</scm>

	<distributionManagement>
		<repository>
			<id>zsmartsystems-sonatype-release</id>
			<name>Sonatype Release</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
		<snapshotRepository>
			<id>zsmartsystems-sonatype-snapshot</id>
			<name>Sonatype Snapshot</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<modules>
		<module>com.zsmartsystems.zigbee</module>
		<module>com.zsmartsystems.zigbee.autocode</module>
		<module>com.zsmartsystems.zigbee.dongle.xbee</module>
		<module>com.zsmartsystems.zigbee.dongle.xbee.autocode</module>
		<module>com.zsmartsystems.zigbee.dongle.cc2531</module>
		<module>com.zsmartsystems.zigbee.dongle.ember</module>
		<module>com.zsmartsystems.zigbee.dongle.ember.autocode</module>
		<module>com.zsmartsystems.zigbee.dongle.conbee</module>
		<module>com.zsmartsystems.zigbee.dongle.telegesis</module>
		<module>com.zsmartsystems.zigbee.dongle.telegesis.autocode</module>
		<module>com.zsmartsystems.zigbee.console</module>
		<module>com.zsmartsystems.zigbee.console.ember</module>
		<module>com.zsmartsystems.zigbee.console.main</module>
		<module>com.zsmartsystems.zigbee.console.telegesis</module>
		<module>com.zsmartsystems.zigbee.serial</module>
		<module>com.zsmartsystems.zigbee.test</module>
		<module>releng/p2repo</module>
	</modules>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>3.0.5</version>
				<configuration>
					<failOnError>false</failOnError>
					<xmlOutput>true</xmlOutput>
					<xmlOutputDirectory>${basedir}/target/site</xmlOutputDirectory>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-site-plugin</artifactId>
					<version>3.7.1</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>animal-sniffer-maven-plugin</artifactId>
					<version>${animal.sniffer.version}</version>
					<configuration>
						<signature>
							<groupId>org.codehaus.mojo.signature</groupId>
							<artifactId>java18</artifactId>
							<version>1.0</version>
						</signature>
						<signature>
							<groupId>net.sf.androidscents.signature</groupId>
							<artifactId>android-api-level-21</artifactId>
							<version>5.0.1_r2</version>
						</signature>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>3.8.0</version>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${source.version}</source>
					<target>${target.version}</target>
					<compilerArgs>-Xpkginfo:always</compilerArgs>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<failOnError>false</failOnError>
				</configuration>
				<executions>
					<execution>
						<id>javadoc-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.0</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.0.0-M1</version>
				<configuration>
					<useReleaseProfile>false</useReleaseProfile>
					<releaseProfiles>release,release-sign-artifacts</releaseProfiles>
					<autoVersionSubmodules>true</autoVersionSubmodules>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>findbugs-maven-plugin</artifactId>
				<version>3.0.5</version>
			</plugin>

			<plugin>
				<groupId>org.jacoco</groupId>
				<artifactId>jacoco-maven-plugin</artifactId>
				<version>0.8.5</version>
				<executions>
					<execution>
						<id>jacoco-prepare-agent</id>
						<goals>
							<goal>prepare-agent</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>com.mycila</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>3.0</version>
				<inherited>false</inherited>
				<configuration>
					<header>src/etc/header.txt</header>
					<aggregate>true</aggregate>
					<failIfMissing>true</failIfMissing>
					<strictCheck>true</strictCheck>
					<includes>
						<include>*/src/**/*.java</include>
					</includes>
					<excludes>
						<exclude>*/src/**/package-info.java</exclude>
					</excludes>
					<properties>
						<year>${license.year}</year>
					</properties>
					<encoding>UTF-8</encoding>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.0</version>
				<configuration>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>3.5.0</version>
				<executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<instructions>
						<Bundle-Name>${project.artifactId}</Bundle-Name>
						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
						<Bundle-Description>${pom.name}</Bundle-Description>
					</instructions>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>animal-sniffer-maven-plugin</artifactId>
				<executions>
					<execution>
						<id>animal-sniffer</id>
						<phase>verify</phase>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<dependencies>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${slf4j.version}</version>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.13.1</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<version>3.2.4</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.awaitility</groupId>
			<artifactId>awaitility</artifactId>
			<version>2.0.0</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>javax.annotation</groupId>
			<artifactId>javax.annotation-api</artifactId>
			<version>1.3.2</version>
		</dependency>

	</dependencies>

	<profiles>
		<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>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<!--
			This profile can either be selected explicitly:
			  mvn -P error-prone-check clean compile
			or implicitly by injecting a JDK in the version range [11,16)
			  JAVA_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home mvn clean compile
			-->
			<id>error-prone-check</id>
			<activation>
				<!-- ErrorProne requires at least version 11 due to compiler hooks
				and starts to require additional flags with version 16... -->
				<jdk>[11,16)</jdk>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<configuration combine.self="override">
							<source>${source.version}</source>
							<target>${target.version}</target>
							<encoding>${project.build.sourceEncoding}</encoding>
							<compilerArgs>
								<arg>-XDcompilePolicy=simple</arg>
								<arg>-Xplugin:ErrorProne</arg>
							</compilerArgs>
							<forceJavacCompilerUse>true</forceJavacCompilerUse>
							<annotationProcessorPaths>
								<path>
									<groupId>com.google.errorprone</groupId>
									<artifactId>error_prone_core</artifactId>
									<version>${error-prone.version}</version>
								</path>
								<!-- Other annotation processors go here.
								If 'annotationProcessorPaths' is set, processors will no longer be 
								discovered on the regular -classpath; see also 'Using Error Prone
								together with other annotation processors' below. -->
							</annotationProcessorPaths>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
