<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>com.danhaywood.mavenmixin</groupId>
    <artifactId>cucumberreporting</artifactId>
    <version>0.0.2</version>

    <packaging>pom</packaging>
    
    <name>${project.groupId}:${project.artifactId}</name>
    <description>
        Maven mixin that configures cucumber reporting plugin for BDD specs.
    </description>
    
    <url>https://github.com/danhaywood/java-mavenmixin-cucumberreporting</url>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:git@github.com:danhaywood/java-mavenmixin-cucumberreporting.git</connection>
        <developerConnection>scm:git:git@github.com:danhaywood/java-mavenmixin-cucumberreporting.git</developerConnection>
        <url>git@github.com:danhaywood/java-mavenmixin-cucumberreporting.git</url>
    </scm>
    <developers>
        <developer>
            <id>danhaywood</id>
            <name>Dan Haywood</name>
            <email>dan@haywood-associates.co.uk</email>
        </developer>
    </developers>    
        
    <profiles>
        <profile>
            <id>mavenmixin-cucumberreporting</id>
            <activation>
                <property>
                    <name>!skip.mavenmixin-cucumberreporting</name>
                </property>
            </activation>
            <properties>
                <maven-cucumber-reporting.version>3.2.0</maven-cucumber-reporting.version>
                <maven-cucumber-reporting.dependency.log4j.version>2.7</maven-cucumber-reporting.dependency.log4j.version>
            </properties>
            <build>
                <plugins>
                    <plugin>
                        <groupId>net.masterthought</groupId>
                        <artifactId>maven-cucumber-reporting</artifactId>
                        <version>${maven-cucumber-reporting.version}</version>
                        <executions>
                            <execution>
                                <id>execution</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>generate</goal>
                                </goals>
                                <configuration>
                                    <projectName>DomainApp</projectName>
                                    <outputDirectory>${project.build.directory}/cucumber-reports</outputDirectory>
                                    <cucumberOutput>${project.build.directory}/cucumber.json</cucumberOutput>
                                </configuration>
                            </execution>
                        </executions>
                        <dependencies>
                            <dependency>
                                <groupId>org.apache.logging.log4j</groupId>
                                <artifactId>log4j-api</artifactId>
                                <version>${maven-cucumber-reporting.dependency.log4j.version}</version>
                            </dependency>
                            <dependency>
                                <groupId>org.apache.logging.log4j</groupId>
                                <artifactId>log4j-core</artifactId>
                                <version>${maven-cucumber-reporting.dependency.log4j.version}</version>
                            </dependency>

                            <dependency>
                                <!-- workaround to not call shutdown hook -->
                                <groupId>org.apache.logging.log4j</groupId>
                                <artifactId>log4j-web</artifactId>
                                <version>${maven-cucumber-reporting.dependency.log4j.version}</version>
                            </dependency>
                        </dependencies>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>danhaywood-mavenmixin-sonatyperelease</id>
            <!-- 
            this profile is not part of the mixin, but is required to be defined as a profile
            in order to release this mixin pom.xml to Maven Central repo
            -->
            <build>
                <plugins>
                    <!-- http://central.sonatype.org/pages/apache-maven.html -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.2</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <!-- http://kohsuke.org/pgp-maven-plugin/secretkey.html instead of maven-gpg-plugin -->
                    <plugin>
                        <groupId>org.kohsuke</groupId>
                        <artifactId>pgp-maven-plugin</artifactId>
                        <version>1.1</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <distributionManagement>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>
        </profile>
    </profiles>


    
</project>
