<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-tools</artifactId>
	<groupId>tech.uom.tools</groupId>
	<version>1.0</version>
	<parent>
		<groupId>tech.uom</groupId>
		<artifactId>uom-parent</artifactId>
		<version>2.2</version>
	</parent>
	<packaging>pom</packaging>
	<name>Units of Measurement Tools</name>
	<url>http://github.com/unitsofmeasurement/uom-tools</url>
	<organization>
		<name>Units of Measurement project</name>
		<url>http://unitsofmeasurement.github.io</url>
	</organization>
	<description>Units of Measurement Tools - supporting JSR 385 and the UOM project</description>
	<licenses>
		<license>
			<name>BSD</name>
			<url>LICENSE</url>
		</license>
	</licenses>

	<modules>
		<module>code-analysis</module>
		<module>shared</module>
		<module>cldr</module>
		<module>obix</module>
	</modules>

	<!-- ======================================================= -->
	<!-- Build Settings -->
	<!-- ======================================================= -->
	<properties>
		<ri.version>2.2</ri.version>
		<lib.version>2.2</lib.version>
		<project.build.javaVersion>1.8</project.build.javaVersion>
		<jdkVersion>1.8</jdkVersion>
		<maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
		<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
		<airline.version>2.9.0</airline.version>
	</properties>

	<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>

				<!-- ======================================================= -->
				<!-- 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 Tools</Specification-Title>
								<Specification-Version>${project.version}</Specification-Version>
								<Specification-Vendor>${project.organization.name}</Specification-Vendor>
								<Implementation-Vendor>Unit-API contributors</Implementation-Vendor>
								<Implementation-URL>${project.organization.url}</Implementation-URL>
							</manifestEntries>
						</archive>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<!-- Dependency Management -->
	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>tech.units</groupId>
				<artifactId>indriya</artifactId>
				<version>${ri.version}</version>
			</dependency>
			<dependency>
				<groupId>tech.uom.lib</groupId>
				<artifactId>uom-lib-common</artifactId>
				<version>${lib.version}</version>
			</dependency>
			<dependency>
				<groupId>tech.uom.tools</groupId>
				<artifactId>uom-shared-tools</artifactId>
				<version>${project.version}</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.15.0</version>
			</dependency>			
			<dependency>
			    <groupId>com.github.rvesse</groupId>
			    <artifactId>airline</artifactId>
			    <version>${airline.version}</version>
			</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>
		</dependencies>
	</dependencyManagement>

   <!-- 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 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>
    
	<profiles>
		<profile>
			<id>license</id>
			<activation>
				<property>
					<name>license</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.google.code.maven-license-plugin</groupId>
						<artifactId>maven-license-plugin</artifactId>
						<configuration>
							<basedir>${basedir}</basedir>
							<header>src/etc/header.txt</header>
							<quiet>false</quiet>
							<failIfMissing>true</failIfMissing>
							<aggregate>false</aggregate>
							<encoding>UTF-8</encoding>
							<excludes>
								<exclude>target/**</exclude>
								<exclude>nbproject/**</exclude>
								<exclude>LICENSE*.txt</exclude>
								<exclude>README.*</exclude>
								<exclude>checkstyle*.*</exclude>
								<exclude>*.css</exclude>
							</excludes>
						</configuration>
						<executions>
							<execution>
								<phase>compile</phase>
								<goals>
									<goal>format</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
