<?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 xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd' xmlns='http://maven.apache.org/POM/4.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.jruby.rack</groupId>
  <artifactId>jruby-rack</artifactId>
  <version>1.1.21</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>1.6.8</jruby.version>
    <vendor.gems.path>vendor/gems</vendor.gems.path>
    <bundler.version>1.7.15</bundler.version>
    <bundler.local>false</bundler.local> <!-- true by default -->
    <saumya.mojo.version>1.0.10</saumya.mojo.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>
  </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>
      <id>rubygems-releases</id>
      <url>http://rubygems-proxy.torquebox.org/releases</url>
    </repository>
    <repository>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <id>sonatype</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-complete</artifactId>
      <version>${jruby.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-servlet_2.5_spec</artifactId>
      <version>1.2</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jsp_2.1_spec</artifactId>
      <version>1.0.1</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-el_1.0_spec</artifactId>
      <version>1.0.2</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.6.6</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.1.4.RELEASE</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>jruby-openssl</artifactId>
      <version>0.9.14</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>
  </dependencies>

  <build>
    <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>2.5.1</version>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <showDeprecation>true</showDeprecation>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.16</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>de.saumya.mojo</groupId>
          <artifactId>gem-maven-plugin</artifactId>
          <version>${saumya.mojo.version}</version>
          <configuration>
            <includeOpenSSL>false</includeOpenSSL>
            <gemHomes>
              <provided>${gem.home}</provided>
            </gemHomes>
          </configuration>
          <executions>
            <execution>
              <id>default-initialize</id>
              <configuration>
                <libDirectory>smt-that-does-not-exists</libDirectory>
              </configuration>
            </execution>
          </executions>
      </plugin>
      <plugin>
        <groupId>de.saumya.mojo</groupId>
        <artifactId>bundler-maven-plugin</artifactId>
        <version>${saumya.mojo.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>de.saumya.mojo</groupId>
        <artifactId>rake-maven-plugin</artifactId>
        <version>${saumya.mojo.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>

