<?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>
    <name>json-command-servlet</name>
    <groupId>com.cedarsoftware</groupId>
    <artifactId>json-command-servlet</artifactId>
    <packaging>jar</packaging>
    <version>1.5.3</version>
    <description>JSON Command Servlet</description>
    <url>https://github.com/jdereg/json-command-servlet</url>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${version.plugin.gpg}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <keyname>${gpg.keyname}</keyname>
                                    <passphrase>${gpg.passphrase}</passphrase>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <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>

    <scm>
        <url>https://github.com/Uriljdereg/json-command-servlet</url>
        <connection>scm:git:git://github.com/jdereg/json-command-servlet.git</connection>
        <developerConnection>scm:git:git@github.com:jdereg/json-command-servlet.git</developerConnection>
      <tag>HEAD</tag>
  </scm>

    <developers>
        <developer>
            <id>jdereg</id>
            <name>John DeRegnaucourt</name>
            <email>jdereg@gmail.com</email>
        </developer>
    </developers>

    <properties>
        <version.json-io>4.9.12</version.json-io>
        <version.java-util>1.26.0</version.java-util>
        <version.groovy>2.4.10</version.groovy>
        <version.servlet>3.1.0</version.servlet>
        <version.slf4j>1.7.25</version.slf4j>
        <version.junit>4.12</version.junit>
        <version.spring>4.3.7.RELEASE</version.spring>
        <version.plugin.assembly>2.6</version.plugin.assembly>
        <version.plugin.compiler>3.5.1</version.plugin.compiler>
        <version.plugin.gmavenplus>1.5</version.plugin.gmavenplus>
        <version.plugin.deploy>2.8.2</version.plugin.deploy>
        <version.plugin.source>3.0.0</version.plugin.source>
        <version.plugin.javadoc>2.10.3</version.plugin.javadoc>
        <version.plugin.gpg>1.6</version.plugin.gpg>
        <version.plugin.nexus>1.6.6</version.plugin.nexus>
        <version.plugin.release>2.5.3</version.plugin.release>
        <version.plugin.surefire>2.19.1</version.plugin.surefire>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Maven Plugin Repository</name>
            <url>http://repo1.maven.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    <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>
            <!-- turn off normal compile/testCompile because we are using gmaven plus groovy compile -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>default-compile</id>
                        <phase>none</phase>
                    </execution>
                    <execution>
                        <id>default-testCompile</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>${version.plugin.gmavenplus}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>addSources</goal>
                            <goal>addTestSources</goal>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>groovydoc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>groovydoc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>${version.plugin.source}</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>${version.plugin.assembly}</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/groovydoc.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>javadoc</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <version>${version.plugin.nexus}</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-surefire-plugin</artifactId>
                <version>${version.plugin.surefire}</version>
                <configuration>
                    <forkCount>3</forkCount>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencies>

        <dependency>
            <groupId>org.codehaus.groovy</groupId>
            <artifactId>groovy-all</artifactId>
            <version>${version.groovy}</version>
        </dependency>

        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${version.slf4j}</version>
        </dependency>

        <dependency>
            <groupId>com.cedarsoftware</groupId>
            <artifactId>json-io</artifactId>
            <version>${version.json-io}</version>
        </dependency>

        <dependency>
            <groupId>com.cedarsoftware</groupId>
            <artifactId>java-util</artifactId>
            <version>${version.java-util}</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${version.junit}</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>${version.servlet}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${version.spring}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${version.spring}</version>
        </dependency>

    </dependencies>
</project>
