https://github.com/jruby/jruby-maven-plugins
maven plugin to handle rubygems in a maven way. including support for rspec, rails, cucumber, rake, etc
https://github.com/jruby/jruby-maven-plugins
Last synced: 3 months ago
JSON representation
maven plugin to handle rubygems in a maven way. including support for rspec, rails, cucumber, rake, etc
- Host: GitHub
- URL: https://github.com/jruby/jruby-maven-plugins
- Owner: jruby
- License: mit
- Created: 2009-11-25T16:14:53.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2025-02-15T13:46:52.000Z (4 months ago)
- Last Synced: 2025-03-28T15:07:56.562Z (3 months ago)
- Language: Java
- Homepage:
- Size: 4.98 MB
- Stars: 113
- Watchers: 13
- Forks: 47
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Changelog: History.txt
- License: license.txt
Awesome Lists containing this project
README
jruby maven plugins
===================[](https://buildhive.cloudbees.com/job/torquebox/job/jruby-maven-plugins/)
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
mavengems
mavengem:https://rubygems.org
. . .
rubygems
compass
0.12.2
gem
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'
org.jruby.maven
gem-maven-plugin
${jruby.plugins.version}
initialize
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](https://github.com/jruby/jruby-maven-plugins/tree/master/gem-maven-plugin/src/it/include-rubygems-in-test-resources/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
org.jruby.maven
gem-maven-plugin
@project.parent.version@
exec
compile
${project.build.directory}/rubygems/bin/compass compile ${basedir}/src/main/webapp/resources/sass
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.
org.jruby.maven
gem-maven-plugin
@project.parent.version@
exec
compile
${project.build.directory}/rubygems/bin/compass compile ${basedir}/src/main/webapp/resources/sass
rubygems
compass
0.12.2
gem
see also [gem-maven-plugin/src/it/execute-compass-with-gems-from-plugin](https://github.com/jruby/jruby-maven-plugins/tree/master/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
* [jruby-maven-plugin/src/it](https://github.com/jruby/jruby-maven-plugins/tree/master/jruby-maven-plugin/src/it)
* [gem-maven-plugin/src/it](https://github.com/jruby/jruby-maven-plugins/tree/master/gem-maven-plugin/src/it)
* . . .running the intergration tests
------------------------------```
mvn clean install -Pintegration-test -Pall
```
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 Requestmeta-fu
-------enjoy :)