<?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>
    <version>0.3</version>
    <groupId>com.dukescript.api</groupId>
    <artifactId>kt-mvvm</artifactId>
    <packaging>bundle</packaging>
    <name>Kotlin MVVM API</name>
    <url>http://dukescript.com</url>
    <description>Model-View-ViewModel API for Kotlin</description>

    <properties>
        <netbeans.compile.on.save>none</netbeans.compile.on.save>
        <project.mainclass>com.dukescript.demo.kotlindemo.Main</project.mainclass>
        <exec.java.bin>${java.home}/bin/java</exec.java.bin>
        <exec.debug.arg>-Ddebug=false</exec.debug.arg>
        <net.java.html.version>1.5.1</net.java.html.version>
        <junit.browser.version>1.0</junit.browser.version>
        <kotlin.version>1.2.0</kotlin.version>
    </properties>
    <developers>
        <developer>
            <id>dukescript</id>
            <name>Anton Epple</name>
            <email>toni.epple@dukescript.com</email>
            <organization>Dukehoff GmbH</organization>
            <organizationUrl>http://www.dukescript.com</organizationUrl>
            <roles>
                <role>Project-Administrator</role>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <licenses>
        <license>
            <name>Apache-2.0</name>
            <url>https://opensource.org/licenses/Apache-2.0</url>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:https://github.com/dukescript/kt-mvvm.git</connection>
        <url>https://github.com/dukescript/kt-mvvm.git</url>
        <developerConnection>scm:git:https://github.com/dukescript/kt-mvvm.git</developerConnection>
        <tag>release-${releaseVersion}</tag>
    </scm>
    <pluginRepositories>
        <pluginRepository>
            <id>jcenter</id>
            <name>JCenter</name>
            <url>https://jcenter.bintray.com/</url>
        </pluginRepository>
    </pluginRepositories>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>1.6.3</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-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>dokka-maven-plugin</artifactId>
                <version>0.9.15</version>
                <executions>
                    <execution>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>dokka</goal>
                            <goal>javadoc</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <moduleName>kt-mvvm</moduleName>
                    <samplesDirs>
                        <dir>src/test/</dir>
                        <dir>src/main/java/com/dukescript/api/kt/impl/</dir>
                    </samplesDirs>
                    <sourceRoots>
                        <root>
                            <path>src/main/java</path>
                        </root>
                    </sourceRoots>
                    <includes>
                        <file>src/main/java/kt-mvvm.md</file>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.4.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>com.dukescript.api.kt</Export-Package>
                        <Bundle-SymbolicName>com.dukescript.api.kt</Bundle-SymbolicName>
                        <Private-Package>META-INF;-split-package:=first,com.dukescript.api.kt.impl</Private-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.3.2</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <proc>none</proc>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>process-sources</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>process-test-sources</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <moduleName>kt-mvvm</moduleName>
                    <jvmTarget>1.6</jvmTarget>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.netbeans.html</groupId>
                <artifactId>html4j-maven-plugin</artifactId>
                <version>${net.java.html.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>process-js-annotations</goal>
                        </goals>
                        <phase>process-test-classes</phase>
                    </execution>
                </executions>
                <configuration>
                    <classes>${project.build.testOutputDirectory}</classes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19.1</version>
                <configuration>
                    <junitArtifactName>com.dukescript.api:junit-osgi</junitArtifactName>
                    <systemPropertyVariables>
                        <fxpresenter.headless>true</fxpresenter.headless>
                    </systemPropertyVariables>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.21.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.netbeans.tools</groupId>
                <artifactId>sigtest-maven-plugin</artifactId>
                <version>1.0</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>verify</phase>
                    </execution>
                </executions>
                <configuration>
                    <action>strictcheck</action>
                    <packages>com.dukescript.api.kt</packages>
                    <sigfile>src/main/assembly/api.sigtest</sigfile>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.14</version>
                <configuration>
                    <inceptionYear>2017</inceptionYear>
                    <organizationName>Dukehoff GmbH</organizationName>
                    <licenseName>apache_v2</licenseName>
                    <failOnMissingHeader>true</failOnMissingHeader>
                    <excludes>
                        <exclude>**/target/**</exclude>
                        <exclude>**/dependency*pom.xml</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>license-check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check-file-header</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>org.netbeans.html</groupId>
            <artifactId>net.java.html</artifactId>
            <version>${net.java.html.version}</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.html</groupId>
            <artifactId>net.java.html.json</artifactId>
            <version>${net.java.html.version}</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.html</groupId>
            <artifactId>net.java.html.boot</artifactId>
            <version>${net.java.html.version}</version>
        </dependency>
        <dependency>
            <groupId>org.netbeans.html</groupId>
            <artifactId>ko4j</artifactId>
            <version>${net.java.html.version}</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib-jre7</artifactId>
            <version>${kotlin.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.dukescript.api</groupId>
            <artifactId>junit-osgi</artifactId>
            <scope>test</scope>
            <version>4.12</version>
        </dependency>
        <dependency>
            <groupId>com.dukescript.api</groupId>
            <artifactId>junit-browser-runner</artifactId>
            <version>${junit.browser.version}</version>
            <scope>test</scope>
            <type>jar</type>
            <exclusions>
                <exclusion>
                    <artifactId>net.java.html</artifactId>
                    <groupId>org.netbeans.html</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>net.java.html.boot</artifactId>
                    <groupId>org.netbeans.html</groupId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.netbeans.html</groupId>
            <artifactId>net.java.html.boot.fx</artifactId>
            <version>${net.java.html.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.dukescript.libraries</groupId>
            <artifactId>net.java.html.lib</artifactId>
            <version>0.4</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.jetbrains</groupId>
            <artifactId>annotations</artifactId>
            <version>13.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
