<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>com.github.mpkorstanje</groupId>
	<artifactId>simmetrics</artifactId>
	<version>4.0.1</version>
	<packaging>pom</packaging>

	<name>SimMetrics</name>
	<inceptionYear>2014</inceptionYear>
	<description>A Java library of similarity and distance metrics e.g. Levenshtein distance and Cosine similarity. All similarity metrics return normalized values rather than unbounded similarity scores. Distance metrics return non-negative unbounded scores.</description>
	<url>https://github.com/mpkorstanje/simmetrics</url>

	<modules>
		<module>simmetrics-core</module>
		<module>simmetrics-example</module>
	</modules>

	<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>mpkorstanje</id>
			<email>rien.korstanje@gmail.com</email>
			<url>https://github.com/mpkorstanje/</url>
		</developer>
	</developers>

	<ciManagement>
		<system>Travis CI</system>
		<url>https://travis-ci.org/mpkorstanje/simmetrics</url>
	</ciManagement>

	<issueManagement>
		<system>GitHub Issues</system>
		<url>https://github.com/mpkorstanje/simmetrics/issues</url>
	</issueManagement>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<scm>
		<url>https://github.com/mpkorstanje/simmetrics</url>
		<connection>scm:git:git://github.com/mpkorstanje/simmetrics.git</connection>
		<developerConnection>scm:git:git@github.com:mpkorstanje/simmetrics.git</developerConnection>
	</scm>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>

			<plugin>
				<groupId>external.atlassian.jgitflow</groupId>
				<artifactId>jgitflow-maven-plugin</artifactId>
				<version>1.0-m5.1</version>
				<configuration>
					<flowInitContext>
						<masterBranchName>master</masterBranchName>
						<developBranchName>develop</developBranchName>
						<featureBranchPrefix>feature-</featureBranchPrefix>
						<releaseBranchPrefix>release-</releaseBranchPrefix>
						<hotfixBranchPrefix>hotfix-</hotfixBranchPrefix>
						<versionTagPrefix>simmetric-</versionTagPrefix>
					</flowInitContext>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>license-maven-plugin</artifactId>
				<version>1.8</version>
				<configuration>
					<verbose>false</verbose>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>update-file-header</goal>
						</goals>
						<phase>process-sources</phase>
						<configuration>
							<organizationName>Simmetrics Authors</organizationName>
							<canUpdateLicense>true</canUpdateLicense>
							<canUpdateCopyright>true</canUpdateCopyright>
							<canUpdateDescription>true</canUpdateDescription>
							<addJavaLicenseAfterPackage>false</addJavaLicenseAfterPackage>
							<licenseName>apache_v2</licenseName>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<!-- Runs the deployment to Nexus Central. Call with `mvn deploy -P release` 
			or with `mvn jgitflow:release-finish -P release` when using gitflow -->
		<profile>
			<id>release</id>
			<activation />
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-deploy-plugin</artifactId>
						<version>2.8.2</version>
					</plugin>

					<plugin>
						<groupId>org.sonatype.plugins</groupId>
						<artifactId>nexus-staging-maven-plugin</artifactId>
						<version>1.6.6</version>
						<extensions>true</extensions>
						<configuration>
							<serverId>ossrh</serverId>
							<nexusUrl>https://oss.sonatype.org/</nexusUrl>
							<autoReleaseAfterClose>false</autoReleaseAfterClose>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.4</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.3</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
			<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>
		</profile>

		<!-- Runs coverage and uploads reports to coveralls.io. Used by Travis -->
		<profile>
			<id>coveralls.io</id>
			<activation />

			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>cobertura-maven-plugin</artifactId>
						<version>2.7</version>
						<configuration>
							<formats>
								<format>xml</format>
							</formats>

							<aggregate>true</aggregate>
							<instrumentation>
								<ignoreTrivial>true</ignoreTrivial>
							</instrumentation>
						</configuration>
					</plugin>
					<plugin>
						<groupId>org.eluder.coveralls</groupId>
						<artifactId>coveralls-maven-plugin</artifactId>
						<version>4.0.0</version>
					</plugin>
				</plugins>
			</build>
		</profile>
		<!-- Creates reports. Call with `mvn clean site -P reports` Kinda slow. 
			Don't waste Travis time building these. -->
		<profile>
			<id>reports</id>
			<activation />
			<reporting>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-project-info-reports-plugin</artifactId>
						<version>2.8.1</version>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>clirr-maven-plugin</artifactId>
						<version>2.6</version>
					</plugin>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>cobertura-maven-plugin</artifactId>
						<version>2.7</version>
						<configuration>
							<formats>
								<format>html</format>
							</formats>
							<aggregate>true</aggregate>
							<instrumentation>
								<ignoreTrivial>true</ignoreTrivial>
								<excludes>
									<exclude>org/simmetrics/example/*.class</exclude>
									<exclude>org/simmetrics/performance/*.class</exclude>
								</excludes>
							</instrumentation>
						</configuration>
					</plugin>
				</plugins>
			</reporting>
		</profile>
	</profiles>
</project>
