Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

updated readme

  • Loading branch information...
commit 0c965f62e586759cb789a1484d3b451e3df8988c 1 parent 408ea41
@mkristian authored
Showing with 65 additions and 15 deletions.
  1. +64 −14 README.md
  2. +1 −1  ruby-maven.gemspec
View
78 README.md
@@ -1,32 +1,82 @@
-# prerequisites #
+# ruby maven [![Build Status](https://secure.travis-ci.org/mkristian/ruby-maven.png)](http://travis-ci.org/mkristian/ruby-maven) #
-* ruby 1.8.7 + rubygems
+once installed it is a fully functional maven installaton with *rmvn* as command.
-* jruby >1.5.x
+it also provides an easy way to embed maven with your ruby scripts
-# installation
+ 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
+or with jruby
+
jgem install ruby-maven
MRI performs much better due to the fast startup of the interpreter.
-# rmvn command
+## build the gem and run specs
+
+to build the gem you need [http://maven.apache.org](maven)
+
+ mvn package
+
+will create the gem in _target_ directory.
+
+to run the specs it is sufficient to run
+
+ mvn process-resources
+
+to get all the files for the gem in place (downloaded via maven). now
+
+ rake
+
+or
+
+ jruby -S rake
-that is basically a proper maven with a ruby launcher. on top of it can use a gemspec file or a Gemfile as POM. originally the idea of non-xml POMs is coming from [http://github.com/sonatype/polyglot-maven](http://github.com/sonatype/polyglot-maven). see [https://github.com/sonatype/polyglot-maven/tree/master/pmaven-jruby](https://github.com/sonatype/polyglot-maven/tree/master/pmaven-jruby) for more details about the ruby DSL, etc
+will run the specs.
-# jetty-run command
+## DSL
-just starts a jetty server inside a rails application if the Gemfile is suitable for jruby and suitable for maven (gems prereleased version are still a problem). if the Gemfile is suitable then just execute
+`rmvn` magic obeys following files
-$ jetty-run
+* <name>.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](http://gembundler.com/)
+* Jarfile,Jarfile.lock provides jar dependencies [jbundler](https://github.com/mkristian/jbundler) (using maven-tools gem)
+* Mvnfile is ruby [DSL](https://github.com/torquebox/maven-tools/wiki/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.
-and you will get an http port on 8080 and an https port on 8443 with selfsigned certifacte for localhost.
+# meta-fu #
-# gwt command
+bug-reports and pull request are most welcome.
-this is a helper which allows to setup a rails application with a GWT UI and helps to run some gwt specific commands.
-see [http://github.com/mkristian/rails-resty-gwt](http://github.com/mkristian/rails-resty-gwt) for more details.
View
2  ruby-maven.gemspec
@@ -32,6 +32,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'minitest', '3.3.0'
s.add_development_dependency 'rake', '= 0.9.2.2'
- File.chmod(0755, File.join("bin", "mvn")) if File.exists? File.join("bin", "mvn")
+ File.chmod(0755, File.join("bin", "mvn"))
end
Please sign in to comment.
Something went wrong with that request. Please try again.