<?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>
    <groupId>com.dukescript.libraries</groupId>
    <artifactId>pom</artifactId>
    <version>0.4</version>
    <packaging>pom</packaging>
    <name>DukeScript Typings and Core Libraries</name>
    <description>Wrappers for JavaScript Libraries</description>
    <developers>
        <developer>
            <id>monacotoni</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>

    <url>http://dukescript.com</url>
    <licenses>
        <license>
            <name>mit</name>
            <url>https://opensource.org/licenses/MIT</url>
            <comments>
                Use any version of publically available Maven Typings Plugin
                to generate typings for any typings file you find.
                Use the generated typings any way you want.
            </comments>
        </license>
        <license>
            <name>gpl_v3</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.html</url>
            <comments>
                Contribute to the Maven Typings Plugin by forking it
                on GitHub and publishing your changes. Alternatively
                visit http://dukescript.com for support and commercial license.
            </comments>
        </license>
    </licenses>
    <scm>
        <connection>scm:git:https://github.com/dukescript/maven-typings-plugin.git</connection>
        <url>https://github.com/dukescript/maven-typings-plugin.git</url>
        <developerConnection>scm:git:https://github.com/dukescript/maven-typings-plugin.git</developerConnection>
        <tag>release-${releaseVersion}</tag>
    </scm>

    <repositories>
        <repository>
            <id>presenter-snapshots</id>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </repository>
        <repository>
            <id>netbeans</id>
            <url>http://bits.netbeans.org/maven2/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>snapshots</id>
            <url>https://maven.java.net/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>
    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <mojo.java.html.version>1.2.3</mojo.java.html.version>
        <net.java.html.version>1.3</net.java.html.version>
        <netbeans.compile.on.save>none</netbeans.compile.on.save>
        <bck2brwsr.version>0.19</bck2brwsr.version>
    </properties>
    <modules>
        <module>mojo-base</module>
        <module>mojo</module>
        <module>mojo-test</module>
        <module>libs/core</module>
        <module>libs/dom</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.dukescript.api</groupId>
                <artifactId>junit-browser-runner</artifactId>
                <version>0.8</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.5.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.10</version>
                    <configuration>
                        <junitArtifactName>com.dukescript.api:junit-osgi</junitArtifactName>
                    </configuration>
                </plugin>
                <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>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.3</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <phase>package</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <additionalparam>-Xdoclint:none</additionalparam>
                        <detectOfflineLinks>false</detectOfflineLinks>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <version>2.5.3</version>
                    <extensions>true</extensions>
                    <configuration>
                        <instructions>
                            <Private-Package>META-INF.typings</Private-Package>
                        </instructions>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>1.3.1</version>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <DependencyConvergence/>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>license</id>
            <activation>
                <property>
                    <name>!skipLicenses</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>license-maven-plugin</artifactId>
                        <version>1.7</version>
                        <configuration>
                            <inceptionYear>2016</inceptionYear>
                            <organizationName>Dukehoff GmbH</organizationName>
                            <failOnMissingHeader>true</failOnMissingHeader>
                            <descriptionTemplate>src/license/header.txt</descriptionTemplate>
                            <excludes>
                                <exclude>**/target/**</exclude>
                                <exclude>**/dependency*pom.xml</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <id>typings-license-check</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check-file-header</goal>
                                    <goal>update-file-header</goal>
                                </goals>
                                <configuration>
                                    <licenseName>mit</licenseName>
                                    <failOnMissingHeader>true</failOnMissingHeader>
                                    <descriptionTemplate>src/license/header.txt</descriptionTemplate>
                                    <roots>
                                        <root>libs</root>
                                        <root>typings</root>
                                    </roots>
                                </configuration>
                            </execution>
                            <execution>
                                <id>plugin-license-check</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check-file-header</goal>
                                    <goal>update-file-header</goal>
                                </goals>
                                <configuration>
                                    <licenseName>gpl_v3</licenseName>
                                    <failOnMissingHeader>true</failOnMissingHeader>
                                    <descriptionTemplate>src/license/header.txt</descriptionTemplate>
                                    <roots>
                                        <root>mojo</root>
                                        <root>mojo-base</root>
                                        <root>mojo-test</root>
                                    </roots>
                                    <excludes>
                                        <exclude>**/com/dukescript/libraries/proc/typescript.js</exclude>
                                        <exclude>**/target/**</exclude>
                                        <exclude>**/dependency-reduced-pom.xml</exclude>
                                    </excludes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>gpg-sign</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>typings-testing</id>
            <activation>
                <property>
                    <name>!skipTests</name>
                </property>
            </activation>
            <modules>
                <module>typings/jquery</module>
                <module>typings/angular</module>
                <module>typings/ko</module>
                <module>typings/underscore</module>
                <module>typings/typings-testing</module>
            </modules>
        </profile>
    </profiles>
</project>
