<?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>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<groupId>org.osframework.util</groupId>
	<artifactId>common-utils</artifactId>
	<version>1.0.1</version>
	<packaging>jar</packaging>

	<name>Common Utilities</name>
	<description>General utility classes useful across OSFramework projects</description>
	<url>http://osframework.org/projects/common-utils/</url>
	<inceptionYear>2012</inceptionYear>

	<organization>
		<name>OSFramework Project</name>
		<url>http://osframework.org/</url>
	</organization>

	<licenses>
		<license>
			<name>The Apache Software License, Version 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<developers>
		<developer>
			<id>davejoyce</id>
			<name>Dave Joyce</name>
			<email>dave@osframework.org</email>
			<timezone>-5</timezone>
			<roles>
				<role>Project Lead</role>
			</roles>
		</developer>
	</developers>
	<contributors>
		<contributor>
			<name>Martin Snyman</name>
			<timezone>2</timezone>
		</contributor>
	</contributors>

	<scm>
		<url>git@github.com/osframework/common-utils.git</url>
		<connection>scm:git:git://github.com/osframework/common-utils.git</connection>
		<developerConnection>scm:git:https://github.com/osframework/common-utils.git</developerConnection>
	</scm>
	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/osframework/common-utils/issues</url>
	</issueManagement>
	<ciManagement>
		<system>Jenkins</system>
		<url>https://osframework.ci.cloudbees.com/</url>
	</ciManagement>

	<distributionManagement>
		<site>
			<id>osframework-project-site</id>
			<url>scp://osframework.org/home/osfservice/osframework.org/projects/common-utils/</url>
		</site>
	</distributionManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.build.javaVersion>1.6</project.build.javaVersion>
		<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
		<buildTimestamp>${maven.build.timestamp}</buildTimestamp>

		<!-- Managed dependency versions -->
		<commons-lang.version>2.6</commons-lang.version>
		<joda-time.version>2.1</joda-time.version>
		<testng.version>6.8</testng.version>
		<testng-ext.version>1.0.0</testng-ext.version>

		<!-- Plugin versions -->
		<maven-compiler-plugin.version>3.0</maven-compiler-plugin.version>
		<maven-surefire-plugin.version>2.12.4</maven-surefire-plugin.version>
		<maven-bundle-plugin.version>2.3.7</maven-bundle-plugin.version>
		<maven-jar-plugin.version>2.4</maven-jar-plugin.version>
		<maven-source-plugin.version>2.2.1</maven-source-plugin.version>
		<maven-javadoc-plugin.version>2.9</maven-javadoc-plugin.version>
		<maven-deploy-plugin.version>2.7</maven-deploy-plugin.version>
		<maven-gpg-plugin.version>1.4</maven-gpg-plugin.version>
		<wagon-webdav-jackrabbit.version>2.2</wagon-webdav-jackrabbit.version>
		<wagon-ssh.version>2.3</wagon-ssh.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>${commons-lang.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>${joda-time.version}</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>org.testng</groupId>
			<artifactId>testng</artifactId>
			<version>${testng.version}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.osframework.testng</groupId>
			<artifactId>testng-ext</artifactId>
			<version>${testng-ext.version}</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>false</filtering>
				<excludes>
					<exclude>**/.empty</exclude>
				</excludes>
			</resource>
			<resource>
				<directory>.</directory>
				<targetPath>META-INF</targetPath>
				<filtering>false</filtering>
				<includes>
					<include>LICENSE.txt</include>
					<include>NOTICE.txt</include>
					<include>README.md</include>
				</includes>
			</resource>
		</resources>
		<extensions>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-webdav-jackrabbit</artifactId>
				<version>${wagon-webdav-jackrabbit.version}</version>
			</extension>
			<extension>
				<groupId>org.apache.maven.wagon</groupId>
				<artifactId>wagon-ssh</artifactId>
				<version>${wagon-ssh.version}</version>
			</extension>
		</extensions>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>${maven-compiler-plugin.version}</version>
				<configuration>
					<source>${project.build.javaVersion}</source>
					<target>${project.build.javaVersion}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
			</plugin>
			
			<!-- Generate OSGi bundle manifest -->
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>${maven-bundle-plugin.version}</version>
				<executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
						<configuration>
							<instructions>
								<_versionpolicy>$(@)</_versionpolicy>
								<Import-Package>
								org.apache.commons.lang;version="2.6";resolution:=optional,
								org.joda.time;version="2.1";resolution:=optional,
								org.joda.time.format;version="2.1";resolution:=optional
								</Import-Package>
							</instructions>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>${maven-jar-plugin.version}</version>
				<configuration>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
						<manifestEntries>
							<Build-Date>${buildTimestamp}</Build-Date>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>${maven-source-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<phase>package</phase>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
				<executions>
					<execution>
						<id>attach-javadoc</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<reporting>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>${maven-javadoc-plugin.version}</version>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-report-plugin</artifactId>
				<version>${maven-surefire-plugin.version}</version>
			</plugin>
		</plugins>
	</reporting>

	<profiles>
		<profile>
			<id>jenkins</id>
			<activation>
				<property>
					<name>env.BUILD_NUMBER</name>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>cobertura-maven-plugin</artifactId>
						<version>2.5.2</version>
						<configuration>
							<formats>
								<format>xml</format>
							</formats>
						</configuration>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>cobertura</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release-sign-artifacts</id>
			<activation>
				<property>
					<name>performRelease</name>
					<value>true</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>${maven-gpg-plugin.version}</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>