<?xml version="1.0" encoding="UTF-8"?>
<project
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
        xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.jetbrains.kotlin</groupId>
        <artifactId>kotlin-project</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>

    <artifactId>apidocs</artifactId>

    <dependencies>
        <dependency>
            <groupId>org.pegdown</groupId>
            <artifactId>pegdown</artifactId>
            <version>${pegdown.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.goldin.plugins</groupId>
                <artifactId>ivy-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>com.goldin.plugins</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>compile-kotlin-sources</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <configuration>
                            <docOutput>${project.basedir}/target/site/apidocs</docOutput>
                            <sources>
                                <src>${project.basedir}/../stdlib/src</src>
                                <src>${project.basedir}/../kunit/src</src>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.jetbrains.kotlin</groupId>
                        <artifactId>kdoc</artifactId>
                        <version>1.0-SNAPSHOT</version>
                    </dependency>

                    <!-- TODO not sure why I need to add the transitive dependencies too? -->
                    <dependency>
                        <groupId>org.pegdown</groupId>
                        <artifactId>pegdown</artifactId>
                        <version>${pegdown.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>

        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-scm</artifactId>
                <version>2.2</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-manager-plexus</artifactId>
                <version>1.6</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.scm</groupId>
                <artifactId>maven-scm-provider-gitexe</artifactId>
                <version>1.6</version>
            </extension>
        </extensions>
    </build>

    <distributionManagement>
        <!--
        To deploy this add this to your ~/.m2/settings.xml

        <server>
            <id>github-project-site</id>
            <username>git</username>
            <scmVersionType>branch</scmVersionType>
            <scmVersion>gh-pages</scmVersion>
        </server>
        -->

        <site>
            <id>github-project-site</id>
            <url>scm:git:ssh://git@github.com/JetBrains/kotlin.git</url>
        </site>
    </distributionManagement>
</project>
