<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>com.cerner.ccl</groupId>
        <artifactId>ccltesting-parent-pom</artifactId>
        <version>2.0.0</version>
        <relativePath>../parent-pom</relativePath>
    </parent>
    <groupId>com.cerner.ccl.testing</groupId>
    <artifactId>cerreal-maven-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <version>2.0.0</version>
    <name>cerreal-maven-plugin Maven Mojo</name>
    <description>A plugin used to generate reports of test outcomes and code coverage by tests executed by the CCL Testing Framework and through the maven-ccl-plugin</description>
    <url>http://maven.apache.org</url>
    <properties>
    </properties>
    <scm>
        <connection>scm:git:https://github.com/cerner/ccl-testing.git</connection>
        <developerConnection>scm:git:https://github.com/cerner/ccl-testing.git</developerConnection>
        <url>https://github.com/cerner/ccl-testing/tree/master/cerreal-maven-plugin</url>
    </scm>
    <developers>
        <developer>
            <name>Fred Eckertson</name>
            <organization>Cerner Corporation</organization>
            <organizationUrl>https://github.com/cerner</organizationUrl>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
        <developer>
            <name>Jeff Wiedemann</name>
            <roles>
                <role>developer</role>
            </roles>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Joshua Hyde</name>
        </contributor>
    </contributors>
    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
            <testResource>
                <directory>src/it/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>help-descriptor</id>
                        <goals>
                            <goal>helpmojo</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>shitty-maven-plugin</artifactId>
                <version>1.0-alpha-3</version>
                <executions>
                    <execution>
                        <id>install-maven-plugin</id>
                        <goals>
                            <goal>install</goal>
                        </goals>
                        <configuration>
                            <version>${project.version}</version>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>add-src-it-java</id>
                        <goals>
                            <goal>add-test-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.basedir}/src/it/java</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>${changes.plugin.version}</version>
                <executions>
                    <execution>
                        <id>validate-changes</id>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>changes-validate</goal>
                        </goals>
                        <configuration>
                            <failOnError>true</failOnError>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <encoding>UTF-8</encoding>
                    <source>${jdk.version}</source>
                    <target>${jdk.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <id>enforce-maven</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[2.2.1,4.0)</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>[1.5,1.9)</version>
                                </requireJavaVersion>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>3.1.1</version>
                <executions>
                    <execution>
                        <id>copy-xsd</id>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <phase>generate-test-sources</phase>
                        <configuration>
                            <includeArtifactIds>cclunit-framework-schema-xml</includeArtifactIds>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <id>unzip-xsd</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <phase>generate-test-sources</phase>
                        <configuration>
                            <target>
                                <unzip dest="${project.build.directory}/dependency/unpacked">
                                    <fileset dir="${project.build.directory}/dependency/">
                                        <include name="*.zip" />
                                    </fileset>
                                </unzip>
                                <mkdir dir="${project.build.directory}/schemas" />
                                <copy todir="${project.build.directory}/schemas" flatten="true">
                                    <fileset dir="${project.build.directory}/dependency/unpacked">
                                        <include name="**/*.xsd" />
                                    </fileset>
                                </copy>
                            </target>
                        </configuration>
                    </execution>
                    <execution>
                        <id>update-autogenerated-files</id>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <phase>process-test-sources</phase>
                        <configuration>
                            <target>
                                <replace dir = "${project.build.testSourceDirectory}/com/cerner/ccl/testing/maven/ccl/reports/common/internal/jaxb">
                                  <include name="**/*.java"/>
                                  <replaceToken>public class</replaceToken>
                                  <replaceValue>@SuppressWarnings("javadoc") public class</replaceValue>
                                </replace>
                            </target>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jvnet.jaxb2.maven2</groupId>
                <artifactId>maven-jaxb2-plugin</artifactId>
                <version>0.14.0</version>
                <executions>
                    <execution>
                        <id>generate-cclunit-objects</id>
                        <phase>generate-test-sources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                        <configuration>
                            <generateDirectory>${project.build.sourceDirectory}</generateDirectory>
                            <generatePackage>com.cerner.ccl.testing.maven.ccl.reports.common.internal.jaxb</generatePackage>
                            <schemaDirectory>${project.build.directory}/schemas</schemaDirectory>
                            <specVersion>2.2</specVersion>
                            <args>
                                <arg>-d</arg>
                                <arg>${project.basedir}/src/test/java</arg>
                            </args>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <excludes>
                        <exclude>**/CerrealPluginITest.java</exclude>
                        <exclude>**/internal/*.java</exclude>
                        <exclude>**/*$*.java</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>test</goal>
                        </goals>
                        <phase>integration-test</phase>
                        <configuration>
                            <excludes>
                                <exclude>none</exclude>
                            </excludes>
                            <includes>
                                <include>**/CerrealPluginITest.java</include>
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-api</artifactId>
            <version>3.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-sink-api</artifactId>
            <version>1.8</version>
        </dependency>        
        <dependency>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-impl</artifactId>
            <version>3.0.0</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>3.1.0</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-component-annotations</artifactId>
            <version>1.7.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.5.2</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.8.0-beta2</version>            
        </dependency>

        <!-- TEST -->
        <dependency>
            <groupId>com.cerner.ccl</groupId>
            <artifactId>cclunit-framework-schema-xml</artifactId>
            <version>2.0</version>
            <classifier>zip</classifier>
            <type>zip</type>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jaxb</groupId>
            <artifactId>jaxb-core</artifactId>
            <version>2.3.0.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-testing</groupId>
            <artifactId>maven-plugin-testing-tools</artifactId>
            <version>3.3.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-api-mockito2</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.powermock</groupId>
            <artifactId>powermock-module-junit4</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-assert</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
        	<groupId>org.seleniumhq.webdriver</groupId>
        	<artifactId>webdriver-common</artifactId>
        	<version>0.9.7376</version>
        	<scope>test</scope>
        </dependency>
        <dependency>
        	<groupId>org.seleniumhq.webdriver</groupId>
        	<artifactId>webdriver-htmlunit</artifactId>
        	<version>0.9.7376</version>
        	<scope>test</scope>
        </dependency>
    </dependencies>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>cobertura</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <configuration>
                    <effort>Max</effort>
                    <threshold>Low</threshold>
                    <excludeFilterFile>${project.basedir}/src/etc/findbugs-exclude.xml</excludeFilterFile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <excludePackageNames>*.internal</excludePackageNames>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
</project>
