Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

maven plugin to handle rubygems in a maven way. including support for rspec, rails, cucumber, rake, etc

Octocat-spinner-32 bundler-maven-plugin [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 cucumber-maven-plugin [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 gem-assembly-descriptors [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 gem-extension [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 gem-maven-plugin [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 gem-parent-mojo [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 gem-proxy [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 integration-tests [maven-release-plugin] prepare for next development iteration February 23, 2013
Octocat-spinner-32 jruby-maven-plugin [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 minitest-maven-plugin [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 parent-mojo [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 rails3-maven-plugin [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 rake-maven-plugin [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 rspec-maven-plugin [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 ruby-tools [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 runit-maven-plugin [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 tests-parent-mojo [maven-release-plugin] prepare for next development iteration April 22, 2014
Octocat-spinner-32 .gitignore cleanup July 26, 2010
Octocat-spinner-32 History.txt updated June 21, 2011
Octocat-spinner-32 README.md Fixed link in README.md March 14, 2013
Octocat-spinner-32 TODO one more June 25, 2012
Octocat-spinner-32 eclipse-code-style.xml eclipse code style defintion May 07, 2010
Octocat-spinner-32 license.txt whitespaces May 14, 2010
Octocat-spinner-32 pom.xml [maven-release-plugin] prepare for next development iteration April 22, 2014
README.md

jruby maven plugins

Build Status

gem artifacts

there is maven repository with torquebox.org which delivers gem (only ruby and java platform) from rubygems.org as gem-artifacts. adding this repository to pom.xml (or settings.xml) enables maven to use gem-artifacts like this

<repositories>
  <repository>
    <id>rubygems-release</id>
    <url>http://rubygems-proxy.torquebox.org/releases</url>
  </repository>
</repositories>
. . .
<dependency>
  <groupId>rubygems</groupId>
  <artifactId>compass</artifactId>
  <version>0.12.2</version>
  <type>gem</type>
</dependency>

now maven will resolve the transient dependencies of the compass gem and downloads the artifact (includng the gem file) into the local repository.

the next question is how to use those artfacts:

installing gems into you project directory

just add the gem-maven-plugin in your pom and execute the 'initialize'. that will install the gem artfacts and its depdencencies into 'target/rubygems'

<build>
  <plugins>
    <plugin>
      <groupId>de.saumya.mojo</groupId>
      <artifactId>gem-maven-plugin</artifactId>
      <version>${jruby.plugins.version}</version>
      <executions>
        <execution>
          <goals>
            <goal>initialize</goal>
          </goals>
        </execution>
      </executions>
    </plugin>
  </plugins>
</build>

the will added as test-resource in way that you can use them with ScriptingContainer (from jruby) - see src/test/java/org/example/javasass/JavaSassTest.java from integration tests.

example: execute bin/compass from the compass gem

add the following to you pom

<plugin>
  <groupId>de.saumya.mojo</groupId>
  <artifactId>gem-maven-plugin</artifactId>
  <version>@project.parent.version@</version>
  <executions>
    <execution>
      <goals>
        <goal>exec</goal>
      </goals>
      <phase>compile</phase>
      <configuration>
        <execArgs>${project.build.directory}/rubygems/bin/compass compile ${basedir}/src/main/webapp/resources/sass</execArgs>
      </configuration>
    </execution>
  </executions>

this will execute compass from the compass gem during the compile phase. you can further isolate the gems by moving the dependency from root level into the plugin.

<plugin>
  <groupId>de.saumya.mojo</groupId>
  <artifactId>gem-maven-plugin</artifactId>
    <version>@project.parent.version@</version>
    <executions>
      <execution>
        <goals>
          <goal>exec</goal>
        </goals>
        <phase>compile</phase>
        <configuration>
          <execArgs>${project.build.directory}/rubygems/bin/compass compile ${basedir}/src/main/webapp/resources/sass</execArgs>
        </configuration>
      </execution>
    </executions>
    <dependencies>
      <dependency>
        <groupId>rubygems</groupId>
        <artifactId>compass</artifactId>
        <version>0.12.2</version>
        <type>gem</type>
      </dependency>
    </dependencies>
  </plugin>

see also gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin

more examples

for more example look into the integration test of the various plugins

contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

meta-fu

enjoy :)

Something went wrong with that request. Please try again.