<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>
	<artifactId>uom-lib</artifactId>
	<groupId>tech.uom.lib</groupId>
	<parent>
		<groupId>tech.uom</groupId>
		<artifactId>uom-parent</artifactId>
		<version>2.2</version>
	</parent>
	<modules>
		<module>common</module>
		<module>assertj</module>
		<module>jackson</module>
		<module>yasson</module>
	</modules>
	<packaging>pom</packaging>
	<name>Units of Measurement Libraries</name>
	<url>https://github.com/unitsofmeasurement/uom-lib</url>
	<organization>
		<name>Units of Measurement project</name>
		<url>https://unitsofmeasurement.github.io</url>
	</organization>
	<description>Units of Measurement Libraries - extending and complementing JSR 385</description>
	<licenses>
		<license>
			<name>BSD</name>
			<url>LICENSE</url>
		</license>
	</licenses>
	<scm>
		<connection>scm:git:https://github.com/unitsofmeasurement/uom-lib.git</connection>
		<developerConnection>scm:git:https://github.com/unitsofmeasurement/uom-lib.git</developerConnection>
		<url>https://github.com/unitsofmeasurement/uom-lib.git</url>
	</scm>

	<!-- ======================================================= -->
	<!-- Build Settings -->
	<!-- ======================================================= -->
	<properties>
		<jdkVersion>8</jdkVersion>
		<project.build.javaVersion>${jdkVersion}</project.build.javaVersion>
		<maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
		<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
		<ri.version>2.2</ri.version><!-- NOT for common -->
		<lib.version>${project.version}</lib.version>
		<hamcrest.junit.version>2.0.0.0</hamcrest.junit.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>tech.units</groupId>
				<artifactId>indriya</artifactId>
				<version>${ri.version}</version>
			</dependency>

			<dependency>
				<groupId>org.hamcrest</groupId>
				<artifactId>hamcrest-junit</artifactId>
				<version>${hamcrest.junit.version}</version>
				<scope>test</scope>
			</dependency>

			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-api</artifactId>
				<version>${junit.jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-params</artifactId>
				<version>${junit.jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.jupiter</groupId>
				<artifactId>junit-jupiter-engine</artifactId>
				<version>${junit.jupiter.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.platform</groupId>
				<artifactId>junit-platform-launcher</artifactId>
				<version>${junit.platform.version}</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.junit.platform</groupId>
				<artifactId>junit-platform-runner</artifactId>
				<version>${junit.platform.version}</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<build>
		<pluginManagement>
			<plugins>
				<!-- ======================================================= -->
				<!-- Compilation -->
				<!-- ======================================================= -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-compiler-plugin</artifactId>
					<configuration>
						<source>${project.build.javaVersion}</source>
						<target>${project.build.javaVersion}</target>
						<encoding>${project.build.sourceEncoding}</encoding>
					</configuration>
				</plugin>

				<!-- ======================================================= -->
				<!-- OSGi bundles with BND -->
				<!-- ======================================================= -->
				<plugin>
					<groupId>biz.aQute.bnd</groupId>
					<artifactId>bnd-maven-plugin</artifactId>
					<version>5.2.0</version>
					<executions>
						<execution>
							<goals>
								<goal>bnd-process</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>build-helper-maven-plugin</artifactId>
					<version>3.0.0</version>
				</plugin>

				<!-- ======================================================= -->
				<!-- JAR packaging -->
				<!-- ======================================================= -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-jar-plugin</artifactId>
					<configuration>
						<archive>
							<manifest>
								<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							</manifest>
							<manifestEntries>
								<Specification-Title>Units of Measurement</Specification-Title>
								<Specification-Version>${project.version}</Specification-Version>
								<Specification-Vendor>${project.organization.name}</Specification-Vendor>
								<Implementation-Vendor>Units of Measurement contributors</Implementation-Vendor>
								<Implementation-URL>${project.organization.url}</Implementation-URL>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>

				<!-- ======================================================= -->
				<!-- JavaDoc Attachment -->
				<!-- ======================================================= -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.1.1</version>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<detectLinks>true</detectLinks>
						<keywords>true</keywords>
						<linksource>true</linksource>
						<failOnError>false</failOnError>
						<source>${maven.compile.sourceLevel}</source>
						<verbose>true</verbose>
					</configuration>
				</plugin>

				<!-- ======================================================= -->
				<!-- Maven License Plugin -->
				<!-- ======================================================= -->
				<plugin>
					<groupId>com.mycila</groupId>
					<artifactId>license-maven-plugin</artifactId>
					<configuration>
						<header>src/main/config/header.txt</header>
						<properties>
							<owner>Werner Keil and others</owner>
							<currentYear>2023</currentYear>
						</properties>
						<excludes>
							<exclude>**/README</exclude>
							<exclude>**/pom.xml</exclude>
							<exclude>**/settings.xml</exclude>
							<exclude>src/test/resources/**</exclude>
							<exclude>src/main/resources/**</exclude>
							<exclude>src/main/config/**</exclude>
							<exclude>src/etc/**</exclude>
							<exclude>docs/**</exclude>
							<exclude>*.css</exclude>
							<exclude>*.editorconfig</exclude>
							<exclude>*.jpg</exclude>
							<exclude>*.png</exclude>
							<exclude>*.yml</exclude>
						</excludes>
						<headerDefinitions>
							<headerDefinition>src/main/config/headers.xml</headerDefinition>
						</headerDefinitions>
						<mapping>
							<java>JAVA_STYLE</java>
						</mapping>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<!-- Deployment to public servers -->
	<distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
		<repository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
	</distributionManagement>

	<!-- Additional repositories -->
	<!-- Helps to resolve Parent POM -->
	<repositories>
		<repository>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
			<id>ossrh-snapshot</id>
			<name>OSSRH Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</repository>
	</repositories>

	<profiles>
		<profile>
			<id>jdk9-setup</id>
			<activation>
				<jdk>[9,)</jdk>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-compiler-plugin</artifactId>
							<configuration>
								<release>8</release>
							</configuration>
							<executions>
								<execution>
									<id>default-compile</id>
									<configuration>
										<release>9</release>
										<source>9</source>
										<target>9</target>
									</configuration>
								</execution>
								<execution>
									<id>base-compile</id>
									<goals>
										<goal>compile</goal>
									</goals>
									<configuration>
										<excludes>
											<exclude>module-info.java</exclude>
										</excludes>
									</configuration>
								</execution>
							</executions>
						</plugin>
					</plugins>
				</pluginManagement>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>build-helper-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>add-jdk9-source</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>add-source</goal>
								</goals>
								<configuration>
									<sources>
										<source>src/main/jdk9</source>
									</sources>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/unitsofmeasurement/uom-lib/issues</url>
	</issueManagement>
</project>
