<?xml version="1.0" encoding="UTF-8"?>
<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">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>de.saumya.mojo</groupId>
    <artifactId>jruby-maven-plugins</artifactId>
    <version>1.0.10</version>
  </parent>
    <version>1.0.10</version>
  <artifactId>parent-mojo</artifactId>
  <packaging>pom</packaging>
  <name>Mojo Parent</name>
  <description>
    shared dependencies and plugins for the mojos
  </description>
  <dependencies>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-core</artifactId>
      <version>${maven.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-artifact</artifactId>
      <version>${maven.version}</version>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>${basedir}/src/main/resources</directory>
      </resource>
      <resource>
        <directory>${basedir}/src/main/ruby</directory>
        <includes>
          <include>**/*.rb</include>
        </includes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-plugin-plugin</artifactId>
        <version>2.5.1</version>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>helpmojo</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <version>1.4</version>
        <executions>
          <execution>
            <id>add-source</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>${project.build.directory}/sources</source>
              </sources>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <pluginManagement>
    	<plugins>
    		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
    		<plugin>
    			<groupId>org.eclipse.m2e</groupId>
    			<artifactId>lifecycle-mapping</artifactId>
    			<version>1.0.0</version>
    			<configuration>
    				<lifecycleMappingMetadata>
    					<pluginExecutions>
    						<pluginExecution>
    							<pluginExecutionFilter>
    								<groupId>
    									org.apache.maven.plugins
    								</groupId>
    								<artifactId>
    									maven-plugin-plugin
    								</artifactId>
    								<versionRange>
    									[2.5.1,)
    								</versionRange>
    								<goals>
    									<goal>helpmojo</goal>
    									<goal>descriptor</goal>
    								</goals>
    							</pluginExecutionFilter>
    							<action>
    								<ignore />
    							</action>
    						</pluginExecution>
    					</pluginExecutions>
    				</lifecycleMappingMetadata>
    			</configuration>
    		</plugin>
    	</plugins>
    </pluginManagement>
  </build>
  <profiles>
    <profile>
      <id>integration-test</id>
      <properties>
	<invoker.skip>false</invoker.skip>
      </properties>
      <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
	  <plugin>
	    <artifactId>maven-invoker-plugin</artifactId>
	    <version>1.5</version>
	    <configuration>
	      <projectsDirectory>src/it</projectsDirectory>
	      <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
	      <preBuildHookScript>setup.bsh</preBuildHookScript>
	      <postBuildHookScript>verify.bsh</postBuildHookScript>
	      <streamLogs>true</streamLogs>
	    </configuration>
	    <executions>
	      <execution>
		<id>integration-test</id>
		<goals>
		  <goal>install</goal>
		  <goal>run</goal>
		</goals>
		<configuration>
		  <!--settingsFile>src/it/settings.xml</settingsFile>
		  <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath-->
		  <pomIncludes>
		    <pomInclude>*/pom.xml</pomInclude>
		  </pomIncludes>
		  <pomExcludes>
		    <pomExclude>*-no-pom/pom.xml</pomExclude>
		  </pomExcludes>
		</configuration>
	      </execution>
	      <execution>
		<id>integration-test-no-pom</id>
		<goals>
		  <goal>run</goal>
		</goals>
		<configuration>
		  <pomIncludes>
		    <pomInclude>*-no-pom/pom.xml</pomInclude>
		  </pomIncludes>
		</configuration>
	      </execution>
	    </executions>
	  </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
