<?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.opsdatastore</groupId>
    <artifactId>opsdatastore-plugin-plugin</artifactId>
    <version>1.4.0</version>

    <name>OpsDataStore Plugin Maven Plugin</name>
    <description>OpsDataStore Plugin Maven Plugin</description>

    <packaging>maven-plugin</packaging>

    <properties>

        <!-- Single point for configurating distribution and dependencies -->
        <artifact.repo.url>http://192.168.15.198/artifactory</artifact.repo.url>
        
        <!--
            Some default project options.  This takes some boiler plate away
            from each sub project
        -->
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <!-- prevent javadoc errors from failing the build :( -->
        <additionalparam>-Xdoclint:none</additionalparam>
    </properties>

    <url>http://opsdatastore.com</url>

    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Todd Nist</name>
            <email>todd@opsdatastore.com</email>
        </developer>
        <developer>
            <name>Josh Goldie</name>
            <email>josh@opsdatastore.com</email>
        </developer>
        <developer>
            <name>Kevin Guthrie</name>
            <email>kevin@opsdatastore.com</email>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/OpsDataStore/OpsDataStore-SDK</url>
        <connection>scm:git:git@192.168.15.190:OpsDataStore/OpsDataStore-SDK.git</connection>
        <developerConnection>scm:git:git@192.168.15.190:OpsDataStore/OpsDataStore-SDK.git</developerConnection>
    </scm>

    <distributionManagement>
        <snapshotRepository>
            <id>ods-snapshots</id>
            <name>opsdatastore-plugin-snapshots</name>
            <url>${artifact.repo.url}/plugins-snapshot-local</url>
        </snapshotRepository>
        <repository>
            <id>ods-releases</id>
            <name>opsdatastore-plugin-releases</name>
            <url>${artifact.repo.url}/plugins-release-local</url>
        </repository>
    </distributionManagement>

    <dependencies>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
            <version>2.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-artifact</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-model</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-repository-metadata</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-utils</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>3.4</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-artifact</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-utils</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.twdata.maven</groupId>
            <artifactId>mojo-executor</artifactId>
            <version>2.2.0</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>14.0.1</version>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>3.4</version>
                    <configuration>
                        <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                    </configuration>
                    <executions>
                        <execution>
                            <id>mojo-descriptor</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>descriptor</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>help-goal</id>
                            <phase>process-classes</phase>
                            <goals>
                                <goal>helpmojo</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
            </plugin>
            <plugin>
                <groupId>com.ning.maven.plugins</groupId>
                <artifactId>maven-dependency-versions-check-plugin</artifactId>
                <version>2.0.4</version>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <failBuildInCaseOfConflict>true</failBuildInCaseOfConflict>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <version>1.12</version>
                <configuration>
                    <verbose>false</verbose>
                    <organizationName>OpsDataStore Inc.</organizationName>
                    <inceptionYear>2017</inceptionYear>
                    <addJavaLicenseAfterPackage>true</addJavaLicenseAfterPackage>
                </configuration>
                <executions>
                    <execution>
                        <id>update-file-header</id>
                        <goals>
                            <goal>update-file-header</goal>
                        </goals>
                        <phase>process-sources</phase>
                        <configuration>
                            <licenseName>apache_v2</licenseName>
                            <roots>
                                <root>src/main/java</root>
                                <root>src/test/java</root>
                            </roots>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


    <profiles>
        <profile>
            <id>deploy-to-central</id>
            <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>
            <build>
                <plugins>
                    <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>
                    <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>
                    <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>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.7</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
