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

  <parent>
    <groupId>org.torquebox</groupId>
    <artifactId>torquebox-build</artifactId>
    <version>2.1.2.redhat.1</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <modelVersion>4.0.0</modelVersion>

  <groupId>org.torquebox</groupId>
  <artifactId>torquebox-build-incremental</artifactId>
  <packaging>pom</packaging>
  <name>TorqueBox Build Incremental Publishing</name>

  <dependencies>
    <dependency>
      <groupId>org.torquebox</groupId>
      <artifactId>torquebox-dist</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>torquebox-server</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.torquebox</groupId>
      <artifactId>torquebox-docs-en_US</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.torquebox</groupId>
      <artifactId>torquebox-docs-getting-started-en_US</artifactId>
      <version>${project.version}</version>
      <type>pom</type>
      <scope>provided</scope>
    </dependency>
  </dependencies>

  <profiles>
    <profile>
      <id>publish-1.8-only</id>
      <activation>
        <property>
          <name>ruby.compat.version</name>
          <value>1.8</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>de.saumya.mojo</groupId>
            <artifactId>jruby-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>install-json</id>
                <phase>install</phase>
                <goals>
                  <goal>jruby</goal>
                </goals>
                <configuration>
                  <args>-S gem install json --no-ri --no-rdoc</args>
                  <gemHome>./target/rubygems</gemHome>
                  <gemPath>./target/rubygems</gemPath>
                </configuration>
              </execution>
              <execution>
                <id>publish-gem-repo</id>
                <phase>install</phase>
                <goals>
                  <goal>jruby</goal>
                </goals>
                <configuration>
                  <file>bin/publish-incrementals.rb</file>
                  <args>/private/projectodd/private-settings.xml ${env.BUILD_NUMBER}</args>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>
