<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>tec.units</groupId>
	<artifactId>unit-tck</artifactId>
	<version>0.4</version>
	<packaging>jar</packaging> <!-- bundle? -->
	<name>Units of Measurement TCK</name>
	<url>http://github.com/unitsofmeasurement/unit-tck</url>
	<organization>
		<name>Units of Measurement project</name>
		<url>http://unitsofmeasurement.github.io</url>
	</organization>
	<description>Units of Measurement (JSR 363) TCK.</description>
	<parent>
		<groupId>tec.uom</groupId>
		<artifactId>uom-parent</artifactId>
		<version>0.8-RC3</version>
	</parent>

	<licenses>
		<license>
			<name>BSD</name>
			<url>LICENSE.txt</url>
		</license>
	</licenses>
	<issueManagement>
		<system>JIRA</system>
		<url>https://java.net/jira/browse/UNITSOFMEASUREMENT</url>
	</issueManagement>
	<scm>
		<url>https://github.com/unitsofmeasurement/unit-tck.git</url>
	</scm>

	<!-- ======================================================= -->
	<!-- Build Settings -->
	<!-- ======================================================= -->
	<properties>
		<jsr.version>0.8-SNAPSHOT</jsr.version>
		<ri.version>0.8-SNAPSHOT</ri.version>
		<jdkVersion>1.7</jdkVersion>
		<project.build.javaVersion>${jdkVersion}</project.build.javaVersion>
		<maven.compile.targetLevel>1.7</maven.compile.targetLevel>
		<maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
		<lib.version>0.8-SNAPSHOT</lib.version>
		<testng.version>6.8.5</testng.version>
		<jboss.test.audit.version>1.1.0.Final</jboss.test.audit.version>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>tec.units</groupId>
				<artifactId>unit-ri</artifactId>
				<version>${ri.version}</version>
				<type>jar</type>
			</dependency>

			<dependency>
				<groupId>tec.uom.lib</groupId>
				<artifactId>uom-lib-common</artifactId>
				<version>${lib.version}</version>
			</dependency>
			<dependency>
				<groupId>org.testng</groupId>
				<artifactId>testng</artifactId>
				<version>${testng.version}</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>${slf4j.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>javax.measure</groupId>
			<artifactId>unit-api</artifactId>
		</dependency>
		<dependency>
			<groupId>tec.units</groupId>
			<artifactId>unit-ri</artifactId>
			<type>jar</type>
		</dependency>

		<!-- dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-all</artifactId> 
			<scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> 
			<scope>test</scope> </dependency -->
		<dependency>
			<groupId>tec.uom.lib</groupId>
			<artifactId>uom-lib-common</artifactId>
		</dependency>
		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
			<version>${slf4j.version}</version>
		</dependency>
		<dependency>
			<groupId>org.mutabilitydetector</groupId>
			<artifactId>MutabilityDetector</artifactId>
			<version>0.9.1</version>
		</dependency>
		<dependency>
			<groupId>org.jboss.test-audit</groupId>
			<artifactId>jboss-test-audit-api</artifactId>
			<version>${jboss.test.audit.version}</version>
		</dependency>
		<dependency>
			<groupId>org.jboss.test-audit</groupId>
			<artifactId>jboss-test-audit-impl</artifactId>
			<version>${jboss.test.audit.version}</version>
		</dependency>
	</dependencies>

	<build>
		<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>
							<mainClass>tec.units.tck.TCKRunner</mainClass>
						</manifest>
						<manifestEntries>
							<Specification-Title>Units of Measurement API</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>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.4.0</version>
				<executions>
					<execution>
						<goals>
							<goal>java</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<mainClass>tec.units.tck.TCKRunner</mainClass>
				</configuration>
			</plugin>

			<!-- ======================================================= -->
			<!-- Packaging (OSGi bundle) -->
			<!-- ======================================================= -->
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Export-Package>tec.units.tck.*</Export-Package>
						<Private-Package>tec.units.tck.internal.*</Private-Package>
					</instructions>
				</configuration>
			</plugin>

			<!-- ======================================================= -->
			<!-- Maven web site -->
			<!-- ======================================================= -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-site-plugin</artifactId>
				<configuration>
					<locales>en</locales>
					<inputEncoding>${project.build.sourceEncoding}</inputEncoding>
					<outputEncoding>UTF-8</outputEncoding>
					<reportPlugins>
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-project-info-reports-plugin</artifactId>
							<version>2.7</version>
							<reportSets>
								<reportSet>
									<reports>
										<report>index</report>
										<report>summary</report>
										<report>license</report>
										<report>scm</report>
										<report>cim</report>
										<report>project-team</report>
										<report>mailing-list</report>
										<report>issue-tracking</report>
									</reports>
								</reportSet>
							</reportSets>
						</plugin>

						<!-- ======================================================= -->
						<!-- Javadoc generation -->
						<!-- -->
						<!-- Do not set <docfilessubdirs> to true, since this -->
						<!-- cause the unwanted copy of .svn sub-directories. -->
						<!-- ======================================================= -->
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-javadoc-plugin</artifactId>
							<version>2.9.1</version>
							<configuration>
								<source>${project.build.javaVersion}</source>             <!-- Enables javadoc to handle assertions present in J2SE 1.4. -->
								<encoding>${project.build.sourceEncoding}</encoding>       <!-- The encoding of the source files. -->
								<docencoding>${project.build.sourceEncoding}</docencoding> <!-- The encoding of the generated HTML files. -->
								<charset>${sourceEncoding}</charset>         <!-- Specifies the HTML character set for this document. -->
								<locale>en</locale>              <!-- Locale that javadoc uses when generating documentation. -->
								<noqualifier>all</noqualifier>   <!-- Omit qualifying package name before class names in output. -->
								<quiet>true</quiet>              <!-- Shuts off non-error and non-warning messages. -->
								<keywords>true</keywords>        <!-- Adds HTML meta keyword tags to the generated files. -->
								<!-- Creates links to existing javadoc-generated documentation of 
									external referenced classes. -->
								<links>
									<link>http://docs.oracle.com/javase/7/docs/api/</link>
								</links>
							</configuration>
						</plugin>

						<!-- ======================================================= -->
						<!-- Code analysis -->
						<!-- ======================================================= -->
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-pmd-plugin</artifactId>
							<version>3.0.1</version>
							<configuration>
								<sourceEncoding>${project.build.sourceEncoding}</sourceEncoding>
								<targetJdk>${project.build.javaVersion}</targetJdk>
							</configuration>
						</plugin>

						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-surefire-plugin</artifactId>
						</plugin>

						<!-- ======================================================= -->
						<!-- Report on test results -->
						<!-- ======================================================= -->
						<plugin>
							<groupId>org.apache.maven.plugins</groupId>
							<artifactId>maven-surefire-report-plugin</artifactId>
							<version>2.16</version>
						</plugin>

						<!-- ======================================================= -->
						<!-- Report on test coverage -->
						<!-- ======================================================= -->
						<plugin>
							<groupId>org.codehaus.mojo</groupId>
							<artifactId>emma-maven-plugin</artifactId>
							<version>1.0-alpha-3</version>
							<reportSets>
								<reportSet></reportSet>
								<reportSet></reportSet>
							</reportSets>
						</plugin>

						<!-- ======================================================= -->
						<!-- Static analysis for occurences of bug patterns -->
						<!-- ======================================================= -->
						<!-- plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>findbugs-maven-plugin</artifactId> 
							<version>2.5.2</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> 
							<artifactId>maven-checkstyle-plugin</artifactId> <version>2.11</version> 
							<configuration> <configLocation>src/etc/checkstyle.xml</configLocation> </configuration> 
							</plugin -->
					</reportPlugins>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<!-- Additional repositories -->
	<!-- Helps to resolve Parent POM and Snapshot artifacts -->
	<repositories>
		<repository>
			<id>geotoolkit</id>
			<name>Geotoolkit.org project</name>
			<url>http://maven.geotoolkit.org</url>
		</repository>
		<repository>
			<id>jcenter</id>
			<name>JCenter</name>
			<url>http://jcenter.bintray.com</url>
		</repository>
		<repository>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<id>bintray-release</id>
			<name>libs-release</name>
			<url>http://oss.jfrog.org/artifactory/libs-release</url>
		</repository>
		<repository>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
			<id>bintray-snapshot</id>
			<name>libs-snapshot</name>
			<url>http://oss.jfrog.org/artifactory/libs-snapshot</url>
		</repository>
	</repositories>
	<distributionManagement>
		<repository>
			<id>bintray-release</id>
			<name>oss-jfrog-artifactory-release</name>
			<url>https://oss.jfrog.org/artifactory/oss-release-local</url>
		</repository>
		<snapshotRepository>
			<id>bintray-snapshot</id>
			<name>oss-jfrog-artifactory-snapshot</name>
			<url>https://oss.jfrog.org/artifactory/oss-snapshot-local</url>
		</snapshotRepository>
	</distributionManagement>

	<profiles>
		<profile>
			<id>license</id>
			<activation>
				<property>
					<name>license</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<pluginManagement>
					<plugins>
						<!-- ======================================================= -->
						<!-- License -->
						<!-- ======================================================= -->
						<!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>license-maven-plugin</artifactId> 
							<version>1.4</version> </plugin> -->
						<plugin>
							<groupId>com.google.code.maven-license-plugin</groupId>
							<artifactId>maven-license-plugin</artifactId>
							<version>1.4.0</version>
							<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>
									<exclude>*.launch</exclude>
								</excludes>
							</configuration>
						</plugin>
						<!-- TODO enable this only for major upgrades (ensure to copy LICENSE.txt 
							to LICENSE.bak first) -->
					</plugins>
				</pluginManagement>
				<plugins>
					<plugin>
						<groupId>com.google.code.maven-license-plugin</groupId>
						<artifactId>maven-license-plugin</artifactId>
						<executions>
							<execution>
								<phase>compile</phase>
								<goals>
									<goal>format</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>version</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<version>1.4.0</version>
						<executions>
							<execution>
								<goals>
									<goal>java</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<mainClass>tec.units.tck.TCKRunner</mainClass>
							<arguments>
								<argument>-version</argument>
							</arguments>
							<!-- <systemProperties> <systemProperty> <key>myproperty</key> <value>myvalue</value> 
								</systemProperty> ... </systemProperties> -->
						</configuration>
					</plugin>

				</plugins>
			</build>

		</profile>
	</profiles>
</project>
