<?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.weaverplatform</groupId>
    <artifactId>import-xmi</artifactId>
    <version>1.0.2</version>

    <!-- Required metadata for Central -->
    <name>import-xmi</name>
    <description>XMI Importer for Weaver</description>
    <url>https://github.com/weaverplatform/weaver-importer-xmi</url>
    <licenses>
        <license>
            <name>GNU General Public License v3.0 (GPLv3)</name>
            <url>http://www.gnu.org/licenses/gpl-3.0.en.html</url>
        </license>
    </licenses>
    <scm>
        <url>https://github.com/weaverplatform/weaver-importer-xmi</url>
        <connection>scm:git:git://github.com/weaverplatform/weaver-importer-xmi.git</connection>
        <developerConnection>scm:git:git@github.com:weaverplatform/weaver-importer-xmi.git</developerConnection>
    </scm>

    <properties>
        <additionalparam>-Xdoclint:none</additionalparam>
    </properties>
    
    <developers>
        <developer>
            <email>jonathan@sysunite.com</email>
            <name>Jonathan Smit</name>
            <url>https://github.com/jonathansmit7</url>
            <id>jonathansmit7</id>
        </developer>
        <developer>
            <email>mohamad@sysunite.com</email>
            <name>Mohamad Alamili</name>
            <url>https://github.com/malamili</url>
            <id>malamili</id>
        </developer>
    </developers>

    <!--http://central.sonatype.org/pages/apache-maven.html-->
    <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>

    <dependencies>
        <!-- Weaver SDK -->
        <dependency>
            <groupId>com.weaverplatform</groupId>
            <artifactId>sdk-java</artifactId>
            <version>1.1.1-SNAPSHOT</version>
        </dependency>
        
        <!-- Testing -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        
        <!-- Apache util -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.3.2</version>
        </dependency>
        
        <!-- XML Parsing -->
        <dependency>
            <groupId>com.jcabi</groupId>
            <artifactId>jcabi-xml</artifactId>
            <version>0.17.2</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.5.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
            
            <!-- Deploying to Central -->
            <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>
        </plugins>
    </build>

        <!--
     Since the generation of the javadoc and source jars as well as signing components with GPG is a fairly time consuming process,
     these executions are isolated from the normal build configuration and moved into a profile.
     -->
    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>

                    <!-- Sources in Central -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>2.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- JavaDoc in Central -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.9.1</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- GPG signing for Central -->
                    <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>