<!-- Copyright (C) 2013 DLR, Germany -->
<!-- All rights reserved -->
<!-- http://www.rcenvironment.de/ -->

<!-- A POM providing analyis features for "RCE Core". These include aggregating 
	dependency information from MANIFEST.MF files, and creating a report of test 
	durations. -->

<!-- Version history: -->
<!-- 2013-06-12 - R. Mischke - initial version providing raw manifest data 
	aggregation -->

<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>de.rcenvironment</groupId>
	<artifactId>de.rcenvironment.core.maven.analysis</artifactId>
	<version>1.0.0</version>

	<parent>
		<groupId>de.rcenvironment</groupId>
		<artifactId>de.rcenvironment.maven.parent.basicSettings</artifactId>
		<version>1.0.0</version>
		<relativePath>../../../de.rcenvironment/maven/parent/basicSettings</relativePath>
	</parent>

	<properties>
		<rce.core.rootpath>../../..</rce.core.rootpath>
	</properties>

	<profiles>

		<profile>
			<id>raw-manifest-data-to-json</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.gmaven</groupId>
						<artifactId>gmaven-plugin</artifactId>
						<executions>
							<execution>
								<id>run-groovy</id>
								<goals>
									<goal>execute</goal>
								</goals>
								<phase>generate-resources</phase>
								<configuration>
									<source>scripts/rawManifestDataToJson.groovy</source>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>raw-osgi-ds-data-to-json</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.gmaven</groupId>
						<artifactId>gmaven-plugin</artifactId>
						<executions>
							<execution>
								<id>run-groovy</id>
								<goals>
									<goal>execute</goal>
								</goals>
								<phase>generate-resources</phase>
								<configuration>
									<source>scripts/RawOsgiDsDataToJson.groovy</source>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>json-osgi-ds-data-to-graphviz</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.gmaven</groupId>
						<artifactId>gmaven-plugin</artifactId>
						<executions>
							<execution>
								<id>run-groovy</id>
								<goals>
									<goal>execute</goal>
								</goals>
								<phase>generate-resources</phase>
								<configuration>
									<source>scripts/JsonOsgiDsDataToGraphviz.groovy</source>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

		<profile>
			<id>packages-export-to-graphviz</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.codehaus.gmaven</groupId>
						<artifactId>gmaven-plugin</artifactId>
						<executions>
							<execution>
								<id>run-groovy</id>
								<goals>
									<goal>execute</goal>
								</goals>
								<phase>generate-resources</phase>
								<configuration>
									<source>scripts/packagesExportToGraphviz.groovy</source>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>

	</profiles>

	<build>
		<outputDirectory>../../target/analysis</outputDirectory>
		<defaultGoal>generate-resources</defaultGoal>
		<plugins>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<phase>initialize</phase>
						<configuration>
							<tasks>
								<!-- ensure output dir exists -->
								<mkdir dir="target" />
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<artifactId>maven-antrun-plugin</artifactId>
					<version>1.3</version>
					<dependencies>
						<dependency>
							<groupId>ant</groupId>
							<artifactId>ant-nodeps</artifactId>
							<version>1.6.5</version>
						</dependency>
						<dependency>
							<groupId>ant</groupId>
							<artifactId>ant-optional</artifactId>
							<version>1.5.3-1</version>
						</dependency>
						<dependency>
							<groupId>xalan</groupId>
							<artifactId>xalan</artifactId>
							<version>2.7.1</version>
						</dependency>
					</dependencies>
				</plugin>
				<plugin>
					<groupId>org.codehaus.gmaven</groupId>
					<artifactId>gmaven-plugin</artifactId>
					<version>1.5</version>
					<configuration>
						<providerSelection>1.8</providerSelection>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

</project>

