<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright 2011 The Open Source Research Group,
                   University of Erlangen-Nürnberg

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

-->
<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>de.fau.cs.osr</groupId>
		<artifactId>tooling</artifactId>
		<version>3.0.7</version>
		<relativePath>../tooling/</relativePath>
	</parent>

	<groupId>de.fau.cs.osr.ptk</groupId>
	<artifactId>parser-toolkit-parent</artifactId>
	<packaging>pom</packaging>
	<name>Parser Toolkit Parent POM</name>
	<inceptionYear>2009</inceptionYear>
	<description>
	    The parser toolkit provides basic facilities for AST building, 
	    traversal, persistence and more.
	</description>

	<modules>
		<module>ptk-common</module>
		<module>ptk-json-tools</module>
		<module>ptk-xml-tools</module>
		<module>ptk-xpath</module>
	</modules>

	<!-- =================================================================== -->
	<!-- Properties - Properties - Properties - Properties - Properties - Pr -->
	<!-- =================================================================== -->

	<properties>
		<tooling.path>../tooling/</tooling.path>

		<!-- Parser Toolkit currently does not conform :( -->
		<maven-checkstyle-plugin.skip>true</maven-checkstyle-plugin.skip>

		<rats-runtime.version>1.15.0</rats-runtime.version>
		<xstream.version>1.4.8</xstream.version>

		<maven-rats-plugin.version>1.3.0.1</maven-rats-plugin.version>

		<!-- Dependencies -->
		<!-- Should be ${project.version} but that causes trouble with the release plugin -->
		<osr-common.version>3.0.7</osr-common.version>
	</properties>

	<!-- =================================================================== -->
	<!-- Dependency Management - Dependency Management - Dependency Manageme -->
	<!-- =================================================================== -->

	<dependencyManagement>
		<dependencies>

			<!-- Rats! -->
			<dependency>
				<groupId>xtc</groupId>
				<artifactId>rats-runtime</artifactId>
				<version>${rats-runtime.version}</version>
			</dependency>

			<!-- XStream -->
			<dependency>
				<groupId>com.thoughtworks.xstream</groupId>
				<artifactId>xstream</artifactId>
				<version>${xstream.version}</version>
			</dependency>

			<!-- Utils -->
			<dependency>
				<groupId>de.fau.cs.osr.utils</groupId>
				<artifactId>utils</artifactId>
				<version>${osr-common.version}</version>
			</dependency>

			<!-- Parser Toolkit - Common -->
			<dependency>
				<groupId>de.fau.cs.osr.ptk</groupId>
				<artifactId>ptk-common</artifactId>
				<version>${osr-common.version}</version>
			</dependency>

		</dependencies>
	</dependencyManagement>

	<!-- =================================================================== -->
	<!-- Plugin Management - Plugin Management - Plugin Management - Plugin  -->
	<!-- =================================================================== -->

	<build>
		<pluginManagement>
			<plugins>

				<!-- Maven Rats! Plugin -->
				<plugin>
					<groupId>de.fau.cs.osr.maven.plugins</groupId>
					<artifactId>maven-rats-plugin</artifactId>
					<version>${maven-rats-plugin.version}</version>
					<executions>
						<execution>
							<id>rats-generate</id>
							<phase>generate-sources</phase>
							<goals>
								<goal>generate</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

			</plugins>
		</pluginManagement>
	</build>

	<!-- =================================================================== -->
	<!-- Profiles - Profiles - Profiles - Profiles - Profiles - Profiles - P -->
	<!-- =================================================================== -->

	<profiles>

		<!-- ==[ enable code coverage on Jenkins ]========================== -->
		<!--
			Jenkins by default defines a property BUILD_NUMBER which is used to
			enable the profile.
		-->
		<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>${cobertura-maven-plugin.version}</version>
						<configuration>
							<formats>
								<format>xml</format>
							</formats>
							<quiet>true</quiet>
							<aggregate>true</aggregate>
						</configuration>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>cobertura</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

    </profiles>
</project>
