<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>org.sonatype.oss</groupId>
        <artifactId>oss-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>org.asciidoctor</groupId>
    <artifactId>asciidoctor-maven-plugin</artifactId>
    <version>1.5.6</version>
    <packaging>maven-plugin</packaging>

    <name>Asciidoctor Maven Plugin</name>
    <description>Asciidoctor Maven Plugin</description>
    <url>https://github.com/asciidoctor/asciidoctor-maven-plugin</url>

    <developers>
        <developer>
            <id>lightguard</id>
            <name>Jason Porter</name>
            <email>lightguard.jp@gmail.com</email>
            <url>http://www.lightguard-jp.info</url>
            <roles>
                <role>Project Lead</role>
            </roles>
            <timezone>UTC-7</timezone>
        </developer>
        <developer>
            <id>mojavelinux</id>
            <name>Dan Allen</name>
            <email>dan.j.allen@gmail.com</email>
            <roles>
                <role>Contributor</role>
            </roles>
            <timezone>-7</timezone>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <prerequisites>
        <maven>3.0.0</maven>
    </prerequisites>

    <scm>
        <url>scm:git:git@github.com:asciidoctor/asciidoctor-maven-plugin.git</url>
        <connection>scm:git:git@github.com:asciidoctor/asciidoctor-maven-plugin.git</connection>
        <developerConnection>scm:git:git@github.com:asciidoctor/asciidoctor-maven-plugin.git</developerConnection>
    </scm>

    <issueManagement>
        <url>https://github.com/asciidoctor/asciidoctor-maven-plugin/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.java.version>1.7</project.java.version>
        <project.execution.environment>JavaSE-1.7</project.execution.environment>
        <spock.version>0.7-groovy-2.0</spock.version>
        <groovy.version>2.1.3</groovy.version>
        <asciidoctorj.version>1.5.6</asciidoctorj.version>
        <maven.coveralls.plugin.version>4.3.0</maven.coveralls.plugin.version>
        <maven.jacoco.plugin.version>0.7.2.201409121644</maven.jacoco.plugin.version>
        <jruby.version>1.7.26</jruby.version>
        <maven.plugin.plugin.version>3.4</maven.plugin.plugin.version>
        <maven.plugin.api.version>2.0</maven.plugin.api.version>
        <maven.project.version>2.2.1</maven.project.version>
        <maven.compiler.plugin.version>3.5.1</maven.compiler.plugin.version>
        <maven.filtering.version>3.1.1</maven.filtering.version>
        <plexus.utils.version>3.0.23</plexus.utils.version>
        <plexus.component.metadata.version>1.5.5</plexus.component.metadata.version>
        <netty.version>4.0.38.Final</netty.version>
        <commons.io.version>2.4</commons.io.version>
        <doxia.version>1.7</doxia.version>
        <gmaven.version>1.5</gmaven.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy-all</artifactId>
                <version>${groovy.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>org.jruby</groupId>
            <artifactId>jruby-complete</artifactId>
            <version>${jruby.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.plugin.api.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>${maven.project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${maven.plugin.plugin.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-filtering</artifactId>
            <version>${maven.filtering.version}</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-interpolation</artifactId>
            <version>1.22</version>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>${plexus.utils.version}</version>
        </dependency>
        <dependency>
            <groupId>org.asciidoctor</groupId>
            <artifactId>asciidoctorj</artifactId>
            <version>${asciidoctorj.version}</version>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>${spock.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-codec-http</artifactId>
            <version>${netty.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-core</artifactId>
            <version>${doxia.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>${commons.io.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.doxia</groupId>
            <artifactId>doxia-module-xhtml</artifactId>
            <version>${doxia.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
                <version>${plexus.component.metadata.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate-metadata</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>${maven.compiler.plugin.version}</version>
                <configuration>
                    <source>${project.java.version}</source>
                    <target>${project.java.version}</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.gmaven</groupId>
                <artifactId>gmaven-plugin</artifactId>
                <version>${gmaven.version}</version>
                <executions>
                    <execution>
                        <configuration>
                            <providerSelection>2.0</providerSelection>
                        </configuration>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.codehaus.gmaven.runtime</groupId>
                        <artifactId>gmaven-runtime-2.0</artifactId>
                        <version>${gmaven.version}</version>
                        <exclusions>
                            <exclusion>
                                <groupId>org.codehaus.groovy</groupId>
                                <artifactId>groovy-all</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>org.codehaus.groovy</groupId>
                        <artifactId>groovy-all</artifactId>
                        <version>${groovy.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>${maven.coveralls.plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${maven.jacoco.plugin.version}</version>
                <executions>
                    <execution>
                        <id>prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>

        <pluginManagement>
          <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>${maven.plugin.plugin.version}</version>
                <configuration>
                    <goalPrefix>asciidoctor</goalPrefix>
                    <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                </configuration>
            </plugin>
            <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
            <plugin>
              <groupId>org.eclipse.m2e</groupId>
              <artifactId>lifecycle-mapping</artifactId>
              <version>1.0.0</version>
              <configuration>
                <lifecycleMappingMetadata>
                  <pluginExecutions>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.codehaus.gmaven</groupId>
                        <artifactId>gmaven-plugin</artifactId>
                        <versionRange>[${gmaven.version},)</versionRange>
                        <goals>
                          <goal>testCompile</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <execute />
                      </action>
                    </pluginExecution>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.codehaus.plexus</groupId>
                        <artifactId>plexus-component-metadata</artifactId>
                        <versionRange>[${plexus.component.metadata.version},)</versionRange>
                        <goals>
                          <goal>generate-metadata</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <execute />
                      </action>
                    </pluginExecution>
                    <pluginExecution>
                      <pluginExecutionFilter>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-plugin-plugin</artifactId>
                        <versionRange>[${maven.plugin.plugin.version},)</versionRange>
                        <goals>
                          <goal>descriptor</goal>
                          <goal>helpmojo</goal>
                        </goals>
                      </pluginExecutionFilter>
                      <action>
                        <execute />
                      </action>
                    </pluginExecution>
                  </pluginExecutions>
                </lifecycleMappingMetadata>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <!--
              To release to bintray, add your credentials to ~/.m2/settings.xml and run:

               $ mvn deploy -Prelease
            -->
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.0.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.10.4</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <configuration>
                            <executable>gpg2</executable>
                            <passphrase>${gpg.passphrase}</passphrase>
                            <useAgent>${gpg.useAgent}</useAgent>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>asciidoctorj-snapshot</id>
            <properties>
                <asciidoctorj.version>1.5.1-SNAPSHOT</asciidoctorj.version>
            </properties>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                    <id>central-bintray</id>
                    <name>bintray</name>
                    <url>http://dl.bintray.com/lordofthejars/maven</url>
                </repository>
            </repositories>
        </profile>
        <profile>
            <id>run-its</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-invoker-plugin</artifactId>
                        <version>2.0.0</version>
                        <configuration>
                            <debug>true</debug>
                            <projectsDirectory>src/it</projectsDirectory>
                            <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
                            <pomIncludes>
                                <pomInclude>*/pom.xml</pomInclude>
                            </pomIncludes>
                            <preBuildHookScript>setup</preBuildHookScript>
                            <postBuildHookScript>validate</postBuildHookScript>
                            <showErrors>true</showErrors>
                            <debug>true</debug>
                            <!-- <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>-->
                            <!-- <settingsFile>src/it/settings.xml</settingsFile>-->
                            <goals>
                                <goal>clean</goal>
                                <goal>process-sources</goal>
                            </goals>
                        </configuration>
                        <executions>
                            <execution>
                                <id>integration-test</id>
                                <goals>
                                    <goal>install</goal>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <repository>
            <id>bintray-asciidoctor-maven-asciidoctor-maven-plugin</id>
            <name>asciidoctor-maven-asciidoctor-maven-plugin</name>
            <url>https://api.bintray.com/maven/asciidoctor/maven/asciidoctor-maven-plugin</url>
        </repository>
    </distributionManagement>
</project>
