<?xml version="1.0"?>
<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>
        <artifactId>thucydides</artifactId>
        <groupId>net.thucydides</groupId>
        <version>0.9.205</version>
    </parent>
    <groupId>net.thucydides.easyb</groupId>
    <artifactId>thucydides-easyb-plugin</artifactId>
    <name>Thucydides Easyb Plugin</name>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.version}</version>
                <configuration>
                    <parallel>classes</parallel>
                    <threadCount>10</threadCount>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>1.4</version>
                <configuration>
                    <providerSelection>1.7</providerSelection>
                    <source />
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>generateStubs</goal>
                            <goal>compile</goal>
                            <goal>generateTestStubs</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.gmaven.runtime</groupId>
                        <artifactId>gmaven-runtime-1.7</artifactId>
                        <version>1.3</version>
                        <exclusions>
                            <exclusion>
                                <groupId>org.codehaus.groovy</groupId>
                                <artifactId>groovy-all</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>${groovy.version}</version>
                        <scope>compile</scope>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.easyb</groupId>
            <artifactId>easyb-core</artifactId>
            <version>${easyb.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>commons-lang</groupId>
                    <artifactId>commons-lang</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.thucydides</groupId>
            <artifactId>thucydides-core</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${groovy.version}</version>
        </dependency>
    </dependencies>
    <profiles>
	    <profile>
			<id>easyb</id>
			  <!-- When maven.test.skip is defined, don't run easyb tests. Ideally, it should check 
			  for skipTests flag too,but maven profile activation doesn't support multiple variables. 
			  More details is here http://jira.codehaus.org/browse/MNG-3328. There is also easyb ticket 
			  created for this issue: http://code.google.com/p/easyb/issues/detail?id=192.-->  
		  	<activation>
				<property>
					<name>!maven.test.skip</name>
		    	</property>
		  	</activation>

		  	<build>
		    	<plugins>
					<plugin>
	                	<groupId>org.easyb</groupId>
	                	<artifactId>maven-easyb-plugin</artifactId>
	                	<version>1.4</version>
	                	<executions>
	                    <execution>
	                        <goals>
	                            <goal>test</goal>
	                        </goals>
	                    </execution>
	            	    </executions>
	                	<dependencies>
	                    <dependency>
	                        <groupId>org.codehaus.groovy</groupId>
	                        <artifactId>groovy-all</artifactId>
	                        <version>${groovy.version}</version>
	                    </dependency>
		                </dependencies>
		                <configuration>
		                    <storyType>html</storyType>
		                    <storyReport>target/easyb/easyb.html</storyReport>
		                    <easybTestDirectory>src/test/stories</easybTestDirectory>
		                </configuration>
		            </plugin>			
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
