<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-common</artifactId>
	<url>https://unitsofmeasurement.github.io/uom-lib</url>
	<organization>
		<name>Units of Measurement project</name>
		<url>https://unitsofmeasurement.github.io</url>
	</organization>
	<description>Units Common Library</description>
	<name>Units of Measurement Common Library for Java</name>
	<parent>
		<groupId>tech.uom.lib</groupId>
		<artifactId>uom-lib</artifactId>
		<version>2.2</version>
	</parent>

	<scm>
		<url>https://github.com/unitsofmeasurement/uom-lib.git</url>
	</scm>
	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/unitsofmeasurement/uom-lib/issues</url>
	</issueManagement>
	<licenses>
		<license>
			<name>BSD</name>
			<url>LICENSE</url>
		</license>
	</licenses>

	<!-- ======================================================= -->
	<!-- Build Settings -->
	<!-- ======================================================= -->
	<properties>
		<jpms.name>tech.uom.lib.common</jpms.name>
		<sourceEncoding>UTF-8</sourceEncoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>${sourceEncoding}</project.reporting.outputEncoding>
		<jdkVersion>1.8</jdkVersion>
		<project.build.javaVersion>${jdkVersion}</project.build.javaVersion>
		<maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
		<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
		<additionalparam>-Xdoclint:none</additionalparam>
		<compile.exclude.files>module-info.java</compile.exclude.files>
		<thisYear>2023</thisYear>
	</properties>

	<dependencies>
		<dependency>
			<groupId>javax.measure</groupId>
			<artifactId>unit-api</artifactId>
		</dependency>
		<dependency>
		  	<groupId>jakarta.inject</groupId>
		  	<artifactId>jakarta.inject-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hamcrest</groupId>
			<artifactId>hamcrest-junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-api</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-params</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.jupiter</groupId>
			<artifactId>junit-jupiter-engine</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-launcher</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.junit.platform</groupId>
			<artifactId>junit-platform-runner</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>${jdkVersion}</source>
					<target>${jdkVersion}</target>
				</configuration>
			</plugin>

			<!-- ======================================================= -->
			<!-- Source Attachment -->
			<!-- ======================================================= -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
			</plugin>

			<plugin>
				<groupId>biz.aQute.bnd</groupId>
				<artifactId>bnd-maven-plugin</artifactId>
 				<configuration>
 					<bnd>-exportcontents: ${jpms.name}.*</bnd>
 				</configuration>
			</plugin>

			<!-- ======================================================= -->
			<!-- JAR -->
			<!-- ======================================================= -->
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
				</configuration>
			</plugin>

			<!-- ======================================================= -->
			<!-- JavaDoc Attachment -->
			<!-- ======================================================= -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
			</plugin>
		</plugins>
	</build>

	<!-- Additional repositories -->
	<!-- Helps to resolve Parent POM and Snapshot artifacts -->
    <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>

	<distributionManagement>
		<repository>
            <id>ossrh</id>
            <name>OSSRH</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<snapshotRepository>
           <id>ossrh</id>
           <name>OSSRH Snapshot</name>
           <url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>
	<ciManagement>
		<system>CircleCI</system>
		<url>https://circleci.com/gh/unitsofmeasurement/uom-lib</url>
	</ciManagement>

	<profiles>
		<profile>
			<id>p2</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.reficio</groupId>
						<artifactId>p2-maven-plugin</artifactId>
						<version>1.3.0</version>
						<executions>
							<execution>
								<id>default-cli</id>
								<configuration>
									<artifacts>
										<!-- specify your depencies here -->
										<!-- <id>groupId:artifactId:version</id> -->
										<artifact>
											<id>javax.measure:unit-api:${jsr.version}</id>
										</artifact>
										<artifact>
											<id>tech.uom.lib:uom-lib-common:${lib.version}</id>
										</artifact>
										<artifact>
											<id>tech.units:indriya:${project.version}</id>
										</artifact>
									</artifacts>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>	
</project>