<?xml version='1.0'?>
<!--
 Copyright (c) 2010-2012 Engine Yard, Inc.
 Copyright (c) 2007-2009 Sun Microsystems, Inc.
 This source code is available under the MIT license.
 See the file LICENSE.txt for details.
 -->
<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.jruby.rack</groupId>
  <artifactId>jruby-rack</artifactId>
  <version>1.2.2</version>
  <name>JRuby-Rack</name>
  <url>http://github.com/jruby/jruby-rack/</url>
  <description>
    A servlet bridge for (Ruby-based) Rack applications that allow them
    to run in Java Application servers using JRuby.
  </description>

  <properties>
    <jruby.version>9.4.7.0</jruby.version>
    <vendor.gems.path>vendor/gems</vendor.gems.path>
    <bundler.version>2.4.19</bundler.version>
    <bundler.local>false</bundler.local> <!-- true by default -->
    <jruby.maven.plugins.version>3.0.3</jruby.maven.plugins.version>
    <gem.home>${project.build.directory}/rubygems</gem.home>
  </properties>

  <issueManagement>
    <system>Github</system>
    <url>http://github.com/jruby/jruby-rack/issues</url>
  </issueManagement>

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

  <scm>
    <connection>scm:git:git://github.com/jruby/jruby-rack.git</connection>
    <developerConnection>scm:git:git@github.com:jruby/jruby-rack.git</developerConnection>
    <url>http://github.com/jruby/jruby-rack/</url>
    <tag>jruby-rack-1.2.2</tag>
  </scm>

  <licenses>
    <license>
      <name>MIT License</name>
      <url>http://www.opensource.org/licenses/mit-license.php</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>nicksieger</id>
      <name>Nick Sieger</name>
      <email>nicksieger@gmail.com</email>
    </developer>
    <developer>
      <id>calavera</id>
      <name>David Calavera</name>
    </developer>
    <developer>
      <id>kares</id>
      <name>Karol Bucek</name>
      <email>self@kares.org</email>
    </developer>
  </developers>

  <repositories>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>sonatype</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
    <repository>
      <id>mavengems</id>
      <url>mavengem:https://rubygems.org</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-core</artifactId>
      <version>${jruby.version}</version>
    </dependency>
    <!-- JavaEE 6 APIs -->
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-servlet_3.0_spec</artifactId>
      <version>1.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jsp_2.2_spec</artifactId>
      <version>1.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-el_2.2_spec</artifactId>
      <version>1.0.4</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jms_1.1_spec</artifactId>
      <version>1.1.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging-api</artifactId>
      <version>1.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      <version>1.7.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-core</artifactId>
      <version>3.2.10.RELEASE</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>jruby-openssl</artifactId>
      <version>0.9.6</version>
      <type>gem</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>bundler</artifactId>
      <version>${bundler.version}</version>
      <type>gem</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>activation</artifactId>
      <version>1.1</version>
    </dependency>
  </dependencies>

  <build>
    <extensions>
      <extension>
        <groupId>org.jruby.maven</groupId>
        <artifactId>mavengem-wagon</artifactId>
        <version>2.0.2</version>
      </extension>
    </extensions>
    <defaultGoal>install</defaultGoal>
    <sourceDirectory>${basedir}/src/main/java</sourceDirectory>
    <resources>
      <resource>
        <directory>${basedir}/src/main/ruby</directory>
      </resource>
      <resource>
        <directory>${basedir}/src/main/tld</directory>
        <targetPath>META-INF</targetPath>
      </resource>
    </resources>
    <testSourceDirectory>${basedir}/src/spec/java</testSourceDirectory>
    <testResources>
      <testResource>
        <directory>${basedir}/src/spec/ruby</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>8</source>
          <target>8</target>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.17</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-help-plugin</artifactId>
        <version>2.2</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.9</version>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>copy-dependencies</goal>
            </goals>
            <!-- .jars for tests to pick up, skipped with -Dmdep.skip=true -->
            <configuration>
              <outputDirectory>${project.build.directory}/lib</outputDirectory>
              <excludeGroupIds>org.jruby,rubygems</excludeGroupIds>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
          <groupId>org.jruby.maven</groupId>
          <artifactId>gem-maven-plugin</artifactId>
          <version>${jruby.maven.plugins.version}</version>
          <configuration>
            <includeOpenSSL>false</includeOpenSSL>
            <gemHomes>
              <provided>${gem.home}</provided>
            </gemHomes>
          </configuration>
          <executions>
            <execution>
              <id>gem-install-bundler</id>
              <phase>test</phase>
              <goals>
                <goal>initialize</goal>
              </goals>
            </execution>
          </executions>
      </plugin>
      <plugin>
        <groupId>org.jruby.maven</groupId>
        <artifactId>bundler-maven-plugin</artifactId>
        <version>${jruby.maven.plugins.version}</version>
        <executions>
          <execution>
            <id>bundle-install</id>
            <phase>test</phase>
            <goals><goal>install</goal></goals>
            <configuration>
              <jruby.version>${jruby.version}</jruby.version>
              <!--<local>false</local>-->
              <bundlerVersion>${bundler.version}</bundlerVersion>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jruby.maven</groupId>
        <artifactId>rake-maven-plugin</artifactId>
        <version>${jruby.maven.plugins.version}</version>
        <executions>
<!--          <execution>-->
<!--            <id>rake-spec</id>-->
<!--            <phase>test</phase>-->
<!--            <goals><goal>rake</goal></goals>-->
<!--            <configuration>-->
<!--              <jruby.version>${jruby.version}</jruby.version>-->
<!--              <args>speconly SKIP_SPECS=${maven.test.skip} FULL_BIN_PATH=true</args>-->
<!--            </configuration>-->
<!--          </execution>-->
          <execution>
            <!-- additional (ruby) generated resources -->
            <id>rake-resources</id>
            <phase>prepare-package</phase>
            <!-- bind "late" so we do not run during compile/test-compile -->
            <goals><goal>rake</goal></goals>
            <configuration>
              <jruby.version>${jruby.version}</jruby.version>
              <args>resources VERSION=${project.version}</args>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.4</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-javadoc-plugin</artifactId>
            <version>2.10.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-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>

