<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>
  <parent>
    <groupId>org.codehaus.waffle</groupId>
    <artifactId>waffle</artifactId>
    <version>1.2</version>
  </parent>
  <packaging>jar</packaging>
  <artifactId>waffle-ruby</artifactId>
  <name>Waffle Ruby</name>
  <dependencies>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>waffle-core</artifactId>
      <version>${pom.version}</version>
    </dependency>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-complete</artifactId>
      <version>1.1.2</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>servlet-api</artifactId>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>${basedir}/src/main/ruby</directory>
        <includes>
          <include>**/*.rb</include>
        </includes>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>${basedir}/src/test/ruby</directory>
        <includes>
          <include>**/*.rb</include>
        </includes>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dependency-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack-jruby-home</id>
            <phase>process-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <outputDirectory>${project.build.directory}/jruby</outputDirectory>
              <includes>META-INF/jruby.home/**</includes>
              <overWriteSnapshots>true</overWriteSnapshots>
              <artifactItems>
                <artifactItem>
                  <groupId>org.jruby</groupId>
                  <artifactId>jruby-complete</artifactId>
                  <version>1.1.2</version>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>rspec-maven-plugin</artifactId>
        <configuration>
          <jrubyHome>${project.build.directory}/jruby/META-INF/jruby.home</jrubyHome>
          <sourceDirectory>${basedir}/src/test/ruby/specs</sourceDirectory>
          <outputDirectory>${basedir}/target</outputDirectory>
          <reportName>rspec-report.html</reportName>
          <ignoreFailure>false</ignoreFailure>
          <skipTests>false</skipTests>
        </configuration>
        <executions>
          <execution>
            <id>test</id>
            <phase>test</phase>
            <goals>
              <goal>spec</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>