<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.github.cukedoctor</groupId>
        <artifactId>cukedoctor</artifactId>
        <version>0.9.1</version>
    </parent>

    <artifactId>cukedoctor-converter</artifactId>
    <packaging>jar</packaging>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-shared-utils</artifactId>
            <version>3.0.0</version>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>

        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.cukedoctor</groupId>
            <artifactId>cukedoctor-extension</artifactId>
            <version>${project.parent.version}</version>
        </dependency>

        <dependency>
            <groupId>io.github.robwin</groupId>
            <artifactId>markup-document-builder</artifactId>
        </dependency>
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-core</artifactId>
            <version>1.11.3</version>
        </dependency>
        <dependency>
            <groupId>org.openjdk.jmh</groupId>
            <artifactId>jmh-generator-annprocess</artifactId>
            <version>1.11.3</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>perf</id>
            <build>
                <resources>
                    <resource>
                        <directory>src/perf/resources</directory>
                        <filtering>true</filtering>
                    </resource>
                    <resource>
                        <directory>src/main/resources</directory>
                        <filtering>true</filtering>
                    </resource>
                </resources>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>3.1</version>
                        <configuration>
                            <compilerVersion>1.7</compilerVersion>
                            <source>1.7</source>
                            <target>1.7</target>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.4.0</version>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath/>
                                <argument>com.github.cukedoctor.CukedoctorBenchmark</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>build-helper-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>add-source</goal>
                                </goals>
                                <configuration>
                                    <sources>
                                        <source>src/perf/java</source>
                                    </sources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                </plugins>
            </build>

        </profile>

        <profile>
            <id>publish-docs</id>

            <build>
                <plugins>
                    <plugin>
                        <groupId>com.github.cukedoctor</groupId>
                        <artifactId>cukedoctor-maven-plugin</artifactId>
                        <version>${project.parent.version}</version>
                        <configuration>
                            <outputFileName>cukedoctor-documentation</outputFileName>
                            <documentTitle>Cukedoctor Documentation</documentTitle>
                            <featuresDir>target/cukedoctor</featuresDir>
                            <outputDir>cukedoctor</outputDir>
                            <format>all</format>
                            <toc>center</toc>
                            <numbered>true</numbered>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>execute</goal>
                                </goals>
                                <phase>install</phase>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-scm-publish-plugin</artifactId>
                        <version>1.1</version>
                        <configuration>
                            <checkoutDirectory>${project.build.outputDirectory}</checkoutDirectory>
                            <checkinComment>Publishing Cukedoctor-${project.parent.version} living documentation.
                            </checkinComment>
                            <content>target/cukedoctor</content>
                            <skipDeletedFiles>true</skipDeletedFiles>
                            <pubScmUrl>scm:git:https://${GH_USER}:${GH_PASS}@github.com/rmpestano/cukedoctor.git</pubScmUrl>
                            <scmBranch>gh-pages</scmBranch>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

    </profiles>


</project>
