<?xml version="1.0"?>
<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>
  <parent>
    <groupId>org.sonatype.oss</groupId>
    <artifactId>oss-parent</artifactId>
    <version>7</version>
  </parent>
  <groupId>com.github.jsimone</groupId>
  <artifactId>webapp-runner</artifactId>
  <version>7.0.84.0</version>
  <name>webapp-runner</name>
  <description>Lightweight Application Launcher. Launch your webapp in the most popular open source web container available with a single command.</description>
  <url>http://jsimone.github.com/webapp-runner</url>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://github.com/jsimone/webapp-runner/blob/master/src/main/resources/license/header.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <developers>
    <developer>
      <id>jsimone</id>
      <name>John Simone</name>
      <email>john@heroku.com</email>
    </developer>
  </developers>
  <mailingLists>
    <mailingList>
      <name>Webapp runner issues</name>
      <subscribe>https://github.com/jsimone/webapp-runner/toggle_watch</subscribe>
      <unsubscribe>https://github.com/jsimone/webapp-runner/toggle_watch</unsubscribe>
      <post>https://github.com/jsimone/webapp-runner/issues/new</post>
      <archive>https://github.com/jsimone/webapp-runner/issues?state=closed</archive>
    </mailingList>
  </mailingLists>
  <scm>
    <connection>scm:git:git@github.com:jsimone/webapp-runner.git</connection>
    <developerConnection>scm:git:git@github.com:jsimone/webapp-runner.git</developerConnection>
    <url>https://github.com/jsimone/webapp-runner</url>
    <tag>webapp-runner-7.0.84.0</tag>
  </scm>
  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/jsimone/webapp-runner/issues/new</url>
  </issueManagement>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  <properties>
    <gpg.plugin.version>1.2</gpg.plugin.version>
    <tomcat.version>7.0.84</tomcat.version>
    <javadoc.plugin.version>2.7</javadoc.plugin.version>
    <source.plugin.version>2.1.2</source.plugin.version>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-core</artifactId>
      <version>${tomcat.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-logging-juli</artifactId>
      <version>${tomcat.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat.embed</groupId>
      <artifactId>tomcat-embed-jasper</artifactId>
      <version>${tomcat.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-jasper</artifactId>
      <version>${tomcat.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-jasper-el</artifactId>
      <version>${tomcat.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.tomcat</groupId>
      <artifactId>tomcat-jsp-api</artifactId>
      <version>${tomcat.version}</version>
    </dependency>
    <dependency>
      <groupId>ru.zinin</groupId>
      <artifactId>tomcat-redis-session</artifactId>
      <version>0.8</version>
    </dependency>
    <dependency>
      <groupId>com.beust</groupId>
      <artifactId>jcommander</artifactId>
      <version>1.27</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
      <version>2.3</version>
    </dependency>
    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <version>6.1.1</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>de.javakaffee.msm</groupId>
      <artifactId>memcached-session-manager-tc7</artifactId>
      <version>1.8.3</version>
    </dependency>
  </dependencies>
  <build>
    <finalName>webapp-runner-no-dep</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.3</version>
        <executions>
          <execution>
            <id>build-jar-with-dependencies</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <descriptorRefs>
            <descriptorRef>jar-with-dependencies</descriptorRef>
          </descriptorRefs>
          <finalName>webapp-runner</finalName>
          <appendAssemblyId>false</appendAssemblyId>
          <archive>
            <manifest>
              <mainClass>webapp.runner.launch.Main</mainClass>
            </manifest>
          </archive>
        </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-release-plugin</artifactId>
        <version>2.5</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <useReleaseProfile>false</useReleaseProfile>
          <releaseProfiles>release</releaseProfiles>
          <goals>deploy</goals>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>prepareForCentral</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <version>${source.plugin.version}</version>
            <executions>
              <execution>
                <id>attach-source</id>
                <phase>package</phase>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>${javadoc.plugin.version}</version>
            <executions>
              <execution>
                <id>attach-javadoc</id>
                <phase>package</phase>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>${gpg.plugin.version}</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>package</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>license-check</id>
      <activation>
        <property>
          <name>staticAnalysis</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>com.mycila.maven-license-plugin</groupId>
            <artifactId>maven-license-plugin</artifactId>
            <executions>
              <execution>
                <phase>test</phase>
                <goals>
                  <goal>check</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <aggregate>true</aggregate>
              <header>license/header.txt</header>
              <excludes>
                <exclude>target/**</exclude>
                <exclude>**/license/header.txt</exclude>
                <exclude>**/*.md</exclude>
                <exclude>**/.gitignore</exclude>
              </excludes>
              <failIfMissing>${staticAnalysis.failOnError}</failIfMissing>
              <headerDefinitions>
                <headerDefinition>license/stringtemplatedefinition.xml</headerDefinition>
              </headerDefinitions>
              <mapping>
                <policy>DOUBLESLASH_STYLE</policy>
                <props>SCRIPT_STYLE</props>
              </mapping>
              <strictCheck>true</strictCheck>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>integration-test</id>
      <build>
        <defaultGoal>install</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>integration-test</id>
                <goals>
                  <goal>install</goal>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <pomIncludes>
                    <pomInclude>*/pom.xml</pomInclude>
                  </pomIncludes>
                </configuration>
              </execution>
            </executions>
            <configuration>
              <projectsDirectory>src/it</projectsDirectory>
              <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
              <preBuildHookScript>setup.groovy</preBuildHookScript>
              <postBuildHookScript>verify.groovy</postBuildHookScript>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <properties>
        <invoker.skip>false</invoker.skip>
      </properties>
    </profile>
  </profiles>
</project>
