<?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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>de.tri-engineering.atlassian.plugins</groupId>
    <artifactId>kotlin-provider-plugin</artifactId>
    <version>1.3.30</version>

    <organization>
        <name>TRi engineering</name>
        <url>https://www.tri-engineering.de</url>
    </organization>

    <scm>
        <connection>scm:git:git://github.com/tri-engineering/atlassian-kotlin-provider-plugin.git</connection>
        <developerConnection>scm:git:git://github.com/tri-engineering/atlassian-kotlin-provider-plugin.git</developerConnection>
        <url>https://github.com/tri-engineering/atlassian-kotlin-provider-plugin</url>
    </scm>

    <developers>
        <developer>
            <name>Ricardo Gross</name>
            <email>ricardo.gross@tri-engineering.de</email>
            <organization>TRi engineering</organization>
            <organizationUrl>https://tri-engineering.de</organizationUrl>
        </developer>
    </developers>

    <name>Kotlin Provider Plugin for Atlassian Server</name>
    <url>https://github.com/tri-engineering/atlassian-kotlin-provider-plugin</url>
    <description>Plugin for Atlassian server products to provide Kotlin runtime as OSGi bundle. This enables running Kotlin based plugins on JIRA, Confluence, Bitbucket, Bamboo etc.</description>
    <inceptionYear>2019</inceptionYear>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-osgi-bundle</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <build>
        <finalName>kotlin-${project.version}-provider-plugin</finalName>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Atlassian-Plugin-Key>${project.groupId}.${project.artifactId}</Atlassian-Plugin-Key>

                        <Export-Package>
                            kotlin.*;version=${project.version}
                        </Export-Package>

                        <Import-Package>
                            sun.*;resolution:=optional,
                            *
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <licenses>
        <license>
            <name>Kotlin™ License</name>
            <url>https://github.com/JetBrains/kotlin/tree/master/license</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <profiles>
        <profile>
            <id>release</id>
            <activation>
                <property>
                    <name>release</name>
                </property>
            </activation>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>3.0.0-M1</version>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>

                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                    <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-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.1.0</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>
                            <gpgArguments>
                                <arg>--pinentry-mode</arg>
                                <arg>loopback</arg>
                            </gpgArguments>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <properties>
        <amps.version>6.3.21</amps.version>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
        </repository>
    </distributionManagement>
</project>
