<?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>io.kokuwa.edge</groupId>
	<artifactId>esh-constants-maven-plugin</artifactId>
	<version>0.1.13</version>
	<packaging>maven-plugin</packaging>

	<name>Eclipse Smarthome Constants generator Maven Plugin</name>
	<description>This Maven plugin generates a Java constant class based on the ESH-INF folders XML content</description>
	<url>https://github.com/kokowaio/esh-constants-maven-plugin</url>
	<inceptionYear>2021</inceptionYear>
	<organization>
		<name>Kokuwa.io</name>
		<url>http://kokuwa.io</url>
	</organization>
	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://opensource.org/licenses/MIT</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>fabian-schlegel</id>
			<name>Fabian Schlegel</name>
			<email>fabian.schlegel@grayc.de</email>
			<url>https://github.com/fabian-schlegel</url>
			<organization>GrayC GmbH</organization>
			<organizationUrl>https://grayc.de</organizationUrl>
		</developer>
	</developers>

	<prerequisites>
		<maven>3.2.5</maven>
	</prerequisites>

	<scm>
		<url>https://github.com/kokuwaio/esh-constants-maven-plugin</url>
		<connection>scm:git:https://github.com/kokuwaio/esh-constants-maven-plugin.git</connection>
		<developerConnection>scm:git:https://github.com/kokuwaio/esh-constants-maven-plugin.git</developerConnection>
		<tag>0.1.13</tag>
	</scm>
	<issueManagement>
		<system>github</system>
		<url>https://github.com/kokuwaio/esh-constants-maven-plugin/issues</url>
	</issueManagement>
	<ciManagement>
		<system>github</system>
		<url>https://github.com/kokuwaio/esh-constants-maven-plugin/actions</url>
	</ciManagement>
	<distributionManagement>
		<snapshotRepository>
			<id>sonatype-nexus</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>sonatype-nexus</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
		</repository>
	</distributionManagement>

	<properties>

		<!-- ===================================================================== -->
		<!-- ============================== Build ================================ -->
		<!-- ===================================================================== -->

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.build.propertiesEncoding>ISO-8859-1</project.build.propertiesEncoding>

		<maven.compiler.source>11</maven.compiler.source>
		<maven.compiler.target>11</maven.compiler.target>
		<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
		<maven.compiler.showWarnings>true</maven.compiler.showWarnings>

		<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>

		<!-- ===================================================================== -->
		<!-- ============================= Versions ============================== -->
		<!-- ===================================================================== -->

		<!-- plugins -->

		<version.org.apache.maven.plugins.clean>3.1.0</version.org.apache.maven.plugins.clean>
		<version.org.apache.maven.plugins.compiler>3.9.0</version.org.apache.maven.plugins.compiler>
		<version.org.apache.maven.plugins.deploy>3.0.0-M2</version.org.apache.maven.plugins.deploy>
		<version.org.apache.maven.plugins.gpg>3.0.1</version.org.apache.maven.plugins.gpg>
		<version.org.apache.maven.plugins.install>3.0.0-M1</version.org.apache.maven.plugins.install>
		<version.org.apache.maven.plugins.javadoc>3.3.1</version.org.apache.maven.plugins.javadoc>
		<version.org.apache.maven.plugins.jar>3.2.2</version.org.apache.maven.plugins.jar>
		<version.org.apache.maven.plugins.plugin_>3.6.4</version.org.apache.maven.plugins.plugin_>
		<version.org.apache.maven.plugins.release>3.0.0-M5</version.org.apache.maven.plugins.release>
		<version.org.apache.maven.plugins.resources>3.2.0</version.org.apache.maven.plugins.resources>
		<version.org.apache.maven.plugins.source>3.2.1</version.org.apache.maven.plugins.source>
		<version.org.apache.maven.plugins.surefire>3.0.0-M5</version.org.apache.maven.plugins.surefire>
		<version.org.codehaus.mojo.tidy>1.1.0</version.org.codehaus.mojo.tidy>
		<version.org.sonatype.plugins.nexus-staging>1.6.8</version.org.sonatype.plugins.nexus-staging>

		<!-- dependencies -->

		<version.org.apache.maven.api>3.8.4</version.org.apache.maven.api>
		<version.org.apache.maven.annotations>3.6.4</version.org.apache.maven.annotations>
		<version.org.junit.jupiter>5.8.2</version.org.junit.jupiter>
		<version.org.mockito>4.3.1</version.org.mockito>
		<version.com.google.testing.compile>0.19</version.com.google.testing.compile>
		<version.com.squareup.javapoet>1.13.0</version.com.squareup.javapoet>

	</properties>

	<dependencyManagement>
		<dependencies>

			<!-- maven -->
			<dependency>
				<groupId>org.apache.maven</groupId>
				<artifactId>maven-plugin-api</artifactId>
				<version>${version.org.apache.maven.api}</version>
			</dependency>
			<dependency>
				<groupId>org.apache.maven.plugin-tools</groupId>
				<artifactId>maven-plugin-annotations</artifactId>
				<version>${version.org.apache.maven.annotations}</version>
			</dependency>

			<!-- libraries -->
			<dependency>
				<groupId>com.squareup</groupId>
				<artifactId>javapoet</artifactId>
				<version>${version.com.squareup.javapoet}</version>
			</dependency>

			<!-- test -->
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>${version.org.junit.jupiter}</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>${version.org.mockito}</version>
			</dependency>
			<dependency>
				<groupId>com.google.testing.compile</groupId>
				<artifactId>compile-testing</artifactId>
				<version>${version.com.google.testing.compile}</version>
			</dependency>

		</dependencies>
	</dependencyManagement>
	<dependencies>

		<!-- maven -->
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<scope>provided</scope>
		</dependency>

		<!-- libraries -->
		<dependency>
			<groupId>com.squareup</groupId>
			<artifactId>javapoet</artifactId>
		</dependency>

		<!-- test -->
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-core</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.google.testing.compile</groupId>
			<artifactId>compile-testing</artifactId>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<build>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-clean-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.clean}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.compiler}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-deploy-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.deploy}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-gpg-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.gpg}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-install-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.install}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.javadoc}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.jar}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-plugin-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.plugin_}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-release-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.release}</version>
					<configuration>
						<tagNameFormat>@{project.version}</tagNameFormat>
						<releaseProfiles>release</releaseProfiles>
						<localCheckout>true</localCheckout>
						<signTag>true</signTag>
					</configuration>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-resources-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.resources}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.source}</version>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<version>${version.org.apache.maven.plugins.surefire}</version>
				</plugin>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>tidy-maven-plugin</artifactId>
					<version>${version.org.codehaus.mojo.tidy}</version>
				</plugin>
				<plugin>
					<groupId>org.sonatype.plugins</groupId>
					<artifactId>nexus-staging-maven-plugin</artifactId>
					<version>${version.org.sonatype.plugins.nexus-staging}</version>
				</plugin>
			</plugins>
		</pluginManagement>
		<plugins>

			<!-- fail if any pom is dirty -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>tidy-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>check</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>

					<!-- add source/javadoc for downstream projects -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- sign documents before upload -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<executions>
							<execution>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

					<!-- autoclose sonatype nexus repo -->
					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<extensions>true</extensions>
						<configuration>
							<serverId>sonatype-nexus</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>true</autoReleaseAfterClose>
						</configuration>
					</plugin>

				</plugins>
			</build>
		</profile>
	</profiles>
</project>
