<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/maven-v4_0_0.xsd">
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>9</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.bomba-lang</groupId>
	<artifactId>bomba</artifactId>
	<version>0.3.1</version>
	<packaging>jar</packaging>
	<name>bomba</name>
	<description>A simple Scala DSL for Answer Set Programming</description>
	<url>http://bomba-lang.org</url>

	<licenses>
		<license>
			<name>BSD 3-clause "New" or "Revised" License</name>
			<url>http://www.spdx.org/licenses/BSD-3-Clause</url>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:https://github.com/mikkoz/${project.artifactId}.git</connection>
		<developerConnection>scm:git:https://github.com/mikkoz/${project.artifactId}.git</developerConnection>
		<url>https://github.com/mikkoz/${project.artifactId}.git</url>
	</scm>

	<developers>
		<developer>
			<name>Mikołaj Koziarkiewicz</name>
		</developer>
	</developers>
	<inceptionYear>2013</inceptionYear>

	<properties>
		<maven.compiler.source>1.7</maven.compiler.source>
		<maven.compiler.target>1.7</maven.compiler.target>
		<encoding>UTF-8</encoding>
		<scala.version>2.10.3</scala.version>

		<javadoc.output>${project.build.directory}/genjavadoc</javadoc.output>
	</properties>

	<repositories> <!-- necessary for macro-paradise plugin -->
		<repository>
			<id>oss.sonatype.org</id>
			<name>sonatype sapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</repository>
	</repositories>

	<dependencies>
		<dependency>
			<groupId>org.scala-lang</groupId>
			<artifactId>scala-library</artifactId>
			<version>${scala.version}</version>
		</dependency>

		<!-- Test -->
		<dependency>
			<groupId>org.scalatest</groupId>
			<artifactId>scalatest_2.10</artifactId>
			<version>2.1.0-RC2</version>
		</dependency>
	</dependencies>


	<profiles>
		<profile>
			<id>withMetrics</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>cobertura-maven-plugin</artifactId>
						<executions>
							<execution>
								<id>code-coverage</id>
								<phase>package</phase>
								<goals>
									<goal>cobertura</goal>
								</goals>
								<inherited>false</inherited>
							</execution>
						</executions>
						<configuration>
							<formats>
								<format>html</format>
								<format>xml</format>
							</formats>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release-version</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>1.4</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<build>
		<sourceDirectory>src/main/scala</sourceDirectory>
		<testSourceDirectory>src/test/scala</testSourceDirectory>
		<plugins>
			<plugin>
				<groupId>net.alchim31.maven</groupId>
				<artifactId>scala-maven-plugin</artifactId>
				<version>3.1.6</version>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
							<goal>testCompile</goal>
						</goals>
						<configuration>
							<args>
								<arg>-P:genjavadoc:out=${javadoc.output}</arg>
								<arg>-make:transitive</arg>
								<arg>-dependencyfile</arg>
								<arg>${project.build.directory}/.scala_dependencies</arg>
							</args>
							<compilerPlugins>
								<compilerPlugin>
									<groupId>org.scala-lang.plugins</groupId>
									<artifactId>macro-paradise_${scala.version}</artifactId>
									<version>2.0.0-SNAPSHOT</version>
								</compilerPlugin>
								<compilerPlugin>
									<groupId>com.typesafe.genjavadoc</groupId>
									<artifactId>genjavadoc-plugin_${scala.version}</artifactId>
									<version>0.5</version>
								</compilerPlugin>
							</compilerPlugins>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.scalatest</groupId>
				<artifactId>scalatest-maven-plugin</artifactId>
				<version>1.0-RC2</version>
				<configuration>
					<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
					<junitxml>.</junitxml>
				</configuration>
				<executions>
					<execution>
						<id>test</id>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.8</version>
				<executions>
					<execution>
						<phase>prepare-package</phase>
						<goals>
							<goal>add-source</goal>
						</goals>
						<configuration>
							<sources>
								<source>${javadoc.output}</source>
							</sources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.9</version>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<minmemory>64m</minmemory>
					<maxmemory>2g</maxmemory>
					<outputDirectory>${project.build.directory}</outputDirectory>
					<detectLinks>true</detectLinks>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.2.1</version>
				<executions>
					<execution>
						<phase>verify</phase>
						<goals>
							<goal>test-jar-no-fork</goal>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
