<?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>3.9.0</version>
  </parent>

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

  <dependencies>
    <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.yaml</groupId>
      <artifactId>snakeyaml</artifactId>
    </dependency>
    <dependency>
      <groupId>org.asciidoctor</groupId>
      <artifactId>asciidoctorj</artifactId>
    </dependency>
    <dependency>
      <groupId>com.github.cukedoctor</groupId>
      <artifactId>cukedoctor-extension</artifactId>
    </dependency>
    <dependency>
      <groupId>io.github.robwin</groupId>
      <artifactId>markup-document-builder</artifactId>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>test-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>perf</id>

      <dependencies>
        <dependency>
          <groupId>org.openjdk.jmh</groupId>
          <artifactId>jmh-core</artifactId>
        </dependency>
        <dependency>
          <groupId>org.openjdk.jmh</groupId>
          <artifactId>jmh-generator-annprocess</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
          <groupId>javax.annotation</groupId>
          <artifactId>javax.annotation-api</artifactId>
        </dependency>
      </dependencies>
      <build>
        <resources>
          <resource>
            <filtering>true</filtering>
            <directory>src/perf/resources</directory>
          </resource>
          <resource>
            <filtering>true</filtering>
            <directory>src/main/resources</directory>
          </resource>
        </resources>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
              <executable>java</executable>
              <arguments>
                <argument>-classpath</argument>
                <classpath></classpath>
                <argument>com.github.cukedoctor.CukedoctorBenchmark</argument>
                <commandlineArgs>-Xms512m</commandlineArgs>
                <commandlineArgs>-Xmx512m</commandlineArgs>
                <commandlineArgs>-XX:+PrintGCTimeStamps</commandlineArgs>
                <commandlineArgs>-XX:+PrintGCDetails</commandlineArgs>
                <commandlineArgs>-XX:+HeapDumpOnOutOfMemoryError</commandlineArgs>
              </arguments>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
          </plugin>
        </plugins>
      </build>

    </profile>

    <profile>
      <id>docs</id>
      <build>
        <plugins>
          <plugin>
            <groupId>com.github.cukedoctor</groupId>
            <artifactId>cukedoctor-maven-plugin</artifactId>
            <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>
              <hideSummarySection>true</hideSummarySection>
              <hideScenarioKeyword>true</hideScenarioKeyword>
              <hideStepTime>true</hideStepTime>
              <sourceHighlighter>coderay</sourceHighlighter>
              <docVersion>${project.parent.version}</docVersion>
              <allowUriRead>true</allowUriRead>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-scm-publish-plugin</artifactId>
            <configuration>
              <checkoutDirectory>${project.build.outputDirectory}</checkoutDirectory>
              <checkinComment>Publishing Cukedoctor-${project.parent.version} living documentation.</checkinComment>
              <content>target/cukedoctor</content>
              <skipDeletedFiles>true</skipDeletedFiles>
              <!--suppress MavenModelInspection -->
              <pubScmUrl>scm:git:https://${GH_TOKEN}@github.com/rmpestano/cukedoctor.git</pubScmUrl>
              <scmBranch>gh-pages</scmBranch>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>

</project>
