<?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>
  <groupId>rubygems</groupId>
  <artifactId>application</artifactId>
  <version>0.0.0</version>
  <packaging>jar</packaging>

  <repositories>
    <repository>
      <id>rubygems-releases</id>
      <url>http://rubygems-proxy.torquebox.org/releases</url>
    </repository>
  </repositories>

  <dependencies>
    <dependency>
      <groupId>rubygems</groupId>
      <artifactId>ruby-world</artifactId>
      <version>0.0.0</version>
      <type>gem</type>
    </dependency>
    <dependency>
      <groupId>com.example</groupId>
      <artifactId>java-world</artifactId>
      <version>0.0.0</version>
    </dependency>
    <dependency>
      <groupId>org.jruby</groupId>
      <artifactId>jruby-complete</artifactId>
      <version>1.6.6</version>
    </dependency>
    <dependency>
      <groupId>de.saumya.mojo</groupId>
      <artifactId>gem-assembly-descriptors</artifactId>
      <version>@project.version@</version>
      <scope>runtime</scope>
    </dependency>
  </dependencies>
  <properties>
    <gem.home>${project.build.directory}/rubygems</gem.home>
  </properties>
  <build>
    <plugins>
      <plugin>
        <groupId>de.saumya.mojo</groupId>
        <artifactId>gem-maven-plugin</artifactId>
        <version>@project.parent.version@</version>
	<executions>
	  <execution>
	    <goals>
	      <goal>initialize</goal>
	    </goals>
	  </execution>
	</executions>
      </plugin>   
      <plugin>
	<artifactId>maven-assembly-plugin</artifactId>
	<version>2.2-beta-5</version>
	<configuration>
	  <descriptorRefs>
	    <descriptorRef>jar-with-dependencies-and-gems</descriptorRef>
	  </descriptorRefs>    
	  <archive>
            <manifest>
              <mainClass>de.saumya.mojo.assembly.Main</mainClass>
            </manifest>
          </archive>
	</configuration>
	<executions>
	  <execution>
	    <phase>package</phase>
	    <goals>
	      <goal>assembly</goal>
	    </goals>
	  </execution>
	</executions>
	<dependencies>
	  <dependency>
	    <groupId>de.saumya.mojo</groupId>
	    <artifactId>gem-assembly-descriptors</artifactId>
	    <version>@project.version@</version>
	  </dependency>
	</dependencies>
      </plugin>     
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
	    <phase>verify</phase>
            <goals>
              <goal>exec</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <executable>java</executable>
          <arguments>
            <argument>-jar</argument>
            <argument>${project.build.directory}/${project.build.finalName}-jar-with-dependencies-and-gems.jar</argument>
	    <argument>hello</argument>
          </arguments>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
