Rawr-like ability to use jruby-maven-plugins to create Java .jar with gems?

Is there a way I can use the
jruby-maven-pluginshttps://github.com/mkristian/jruby-maven-pluginsto
package up all of the gem dependencies into the .jar I create for a
Java
project? If I want to create an assembly using the Maven Assembly
Pluginhttp://maven.apache.org/plugins/maven-assembly-plugin/,
I can’t use the descriptorRef of
jar-with-dependencieshttp://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependenciesto
bundle it up, since it doesn’t know how to package .gem types:

[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-assembly-plugin:2.2:assembly
(default-cli) on
project ruby-maven-gems: Failed to create assembly: Error adding
file-set
for ‘rubygems:rubyzip2:gem:2.0.1’ to archive: Error adding archived
file-set. PlexusIoResourceCollection not found for:
/Users/klauer/.m2/repository/rubygems/rubyzip2/2.0.1/rubyzip2-2.0.1.gem:
No
such archiver: ‘gem’. -> [Help 1]

So I was just wondering if there was a way to create something like
rawrhttp://rawr.rubyforge.orgdoes, but for Maven projects?

-Nick K.

On Wed, Feb 16, 2011 at 11:56 PM, Nick K. [email protected] wrote:

Is there a way I can use the jruby-maven-plugins to package up all of the
gem dependencies into the .jar I create for a Java project?

I guess I just do not know how you want to pack them. just zip up all
the gem files as they are ?

you could set a resource pointing to
${project.build.directory}/rubygems/cache

see https://gist.github.com/830212

or unpacked gems like you get it via gems install ?

then you use ${project.build.directory}/rubygems/ for the resource
directory

sorry, I am a bit ignorant in that matter . . .

/Users/klauer/.m2/repository/rubygems/rubyzip2/2.0.1/rubyzip2-2.0.1.gem: No
such archiver: ‘gem’. -> [Help 1]

probably it is possible to add the right archiver for gems, but first
I need to understand what exactly is needed :wink:

regards, Kristian

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs