<?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.268</version>
    </parent>
    <groupId>net.thucydides.easyb</groupId>
    <artifactId>thucydides-easyb-plugin</artifactId>
    <version>0.9.268</version>
    <name>Thucydides Easyb Plugin</name>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <thucydides.version>0.9.268</thucydides.version>
        <groovy.version>2.3.3</groovy.version>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${surefire.version}</version>
                <configuration>
                    <parallel>classes</parallel>
                    <threadCountClasses>10</threadCountClasses>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.bluetrainsoftware.maven</groupId>
                <artifactId>groovydoc-maven-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <id>attach-docs</id>
                        <goals>
                            <goal>attach-docs</goal>
                        </goals>
                        <phase>package</phase>
                    </execution>
                </executions>
                <configuration>
                    <destinationDirectory>${project.basedir}/target/apidocs</destinationDirectory>
                </configuration>
            </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>${thucydides.version}</version>
        </dependency>
        <dependency>
            <groupId>net.thucydides</groupId>
            <artifactId>thucydides-test-utils</artifactId>
            <version>${thucydides.version}</version>
            <scope>test</scope>
        </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>
                    <plugin>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-eclipse-compiler</artifactId>
                        <version>2.8.0-01</version>
                        <extensions>true</extensions>
                        <!-- add Groovy source folder src/main/groovy (not auto-detected if src/main/java doesn't exist) -->
                    </plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
