Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

ruby wrapper around maven and more

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 it
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 MIT-LICENSE
Octocat-spinner-32 Mavenfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 TODO
Octocat-spinner-32 pom.xml
Octocat-spinner-32 ruby-maven.gemspec
README.md

ruby maven #

  • Build Status #

ruby maven is a fully functional maven installation with a ruby command rmvn as launcher.

it also provides an easy way to embed maven with your ruby scripts

require 'maven/ruby/maven'
mvn = Maven::Ruby::Maven.new
mvn.exec( 'install', '-f' 'my-pom.xml' )

in case if JRuby it will run within the same JVM otherwise it will launch java. so you need java installed in any case.

ruby-maven also understands how to use a gemspec file or Gemfile/Jarfile from (J)Bundler as DSL:some magc creates a .pom.xml which is used to run maven.

rails magic

for a rails application the magic knows how to pack war file of the rails-application

rmvn package -Pproduction

now you can run your war-file with a servlet engine. for example using jetty-run gem:

jetty-run war my.war

executable jar

for gem project to build an executable single jar with all the classes including jruby itself and all the gems declared. it also packs all the files from the bin directory as well the executable from your embedded gems.

rmvn package -Pexecutable

now you can start your jar with

java -jar my.jar my_command

installation

gem install ruby-maven

or with jruby

jgem install ruby-maven

when using ruby-maven then MRI performs much better due to the fast startup of the interpreter.

build the gem and run specs

to build the gem you need http://maven.apache.org

mvn package

will create the gem in target directory.

to run the specs first you need to get all the files for the gem in place (download them via maven) by executing

mvn process-resources

now

rake

or

jruby -S rake

will run the specs.

hacking

the directory layout uses the one which comes from maven itself and thus the ruby code is located under lib/ruby.

DSL

rmvn magic obeys following files

  • .gemspec which provides project metadata as well gem dependencies and jar dependencies (via the requirements array of the gemspec)
  • Gemfile,Gemfile.lock provides gem dependencies bundler
  • Jarfile,Jarfile.lock provides jar dependencies jbundler (using maven-tools gem)
  • Mvnfile is ruby DSL as replacement for pom.xml (using maven-tools gem)
  • any jar dependencies in the gemspec requirements of any gem is honourede# rts and pull request are most welcome.

meta-fu

bug-reports and pull request are most welcome.

Something went wrong with that request. Please try again.