<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>
	<version>1.0.0</version>
	<artifactId>de.rcenvironment.maven.preprocessor</artifactId>
	<name>RCE Module ${project.artifactId}</name>
	<packaging>pom</packaging>

	<properties>
		<!-- default main class to use for chaining Maven invocations -->
		<rce.maven.chaining.mainClass>org.codehaus.plexus.classworlds.launcher.Launcher</rce.maven.chaining.mainClass>
	</properties>

	<build>
		<defaultGoal>compile</defaultGoal>
		<plugins>
			<plugin>
				<groupId>org.codehaus.gmaven</groupId>
				<artifactId>gmaven-plugin</artifactId>
				<version>1.5</version>
				<executions>
					<execution>
						<id>run-groovy</id>
						<goals>
							<goal>execute</goal>
						</goals>
						<phase>initialize</phase>
						<configuration>
							<properties>
								<rce.maven.preprocessor.projectRoot>${basedir}/../../..</rce.maven.preprocessor.projectRoot>
								<rce.maven.preprocessor.secondStagePomPath>/de.rcenvironment/maven/secondStage/pom.xml</rce.maven.preprocessor.secondStagePomPath>
							</properties>
							<scriptpath>
								<element>${project.basedir}/scripts</element>
							</scriptpath>
							<source><![CDATA[
								def mavenIntegration = new MavenIntegration(project)
								new RCEBuildPreprocessor(mavenIntegration).configure()
							]]></source>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.3.2</version>
				<executions>
					<execution>
						<goals>
							<goal>java</goal>
						</goals>
						<phase>compile</phase>
						<configuration>
							<mainClass>${rce.maven.chaining.mainClass}</mainClass>
							<commandlineArgs>${rce.maven.internal.secondStageArguments}</commandlineArgs>
							<includeProjectDependencies>false</includeProjectDependencies>
							<killAfter>-1</killAfter> <!-- suppress deprecation warning -->
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>
