On Fri, Dec 18, 2009 at 11:29 PM, kristian <[email protected]> wrote: > hello, > > after reading through the maven_gem code which was commited a few days > ago and having almost the same code for the gem artifact I am working > on. I decided to setup a maven plugin which does take a pom and > converts it into a gem.
I should also mention that the Nexus/Sonatype guys have jumped on the gem idea and already worked up Java code that can pretend to be a RubyGems server but transparently back the server with a Maven repository. The code is here: http://github.com/cstamas/nexus-ruby-support/ There's going to be a plugin for Nexus and a publicly-hosted server soon as a result. I don't think they're using the maven_gem code at all, but if it means there's soon an automatic maven-backed gem source we can use, I don't care how it happens :) > right now you need to build the plugins from source > > http://github.com/mkristian/jruby-maven-plugins > > just install the plugins with > $ mvn install -Dmaven.test.skip=true > (there are two failing tests with some failures on gem index of > gem.rubyforge.org) > > then have a look at the integration test of the gemify goal: > $ cd gem-maven-plugin > $ mvn integration-test > $ cd src/it/gemify > > and look at the target directory. > > it gemifies the pom itself and its dependencies. the biggest advantage > is that the pom.xml can use properties defining artifactIds or inherit > the version,groupId from parent pom, maven builds the object model > from the given pom.xml. since maven does the dependency resolution as > well the pom can use pom dependencies to share common sets of "real" > dependencies. It looks like you've definitely put more work in than I have. Given that there's now at least 4 people hacking on Maven gem support, I think we've definitely hit on a good idea. Hopefully there's a way we can collaborate. The other side of this idea, which I've been thinking about a bit, is to make it possible to treat any RubyGem as a Maven dependency. The mapping from pom to gemspec is almost 1:1. There's obviously some challenges involved in making a RubyGem workable as a Maven artifact, but I'd be willing to discuss a way to structure it. > one feature I will include today will be that you can call the goal > with artifactId, groupId and version and then does the same procedure. > > one part of the code if from maven_gem and the other is shared with > gem-artifact code. > > I have to say that maven plugins which are not included in the central > repository are a bit nasty to install and call from the command line. > usability improves significantly when putting a plugin onto the > central repository. The thing I really like about the transparent gem server is that we could add that server as a default source for JRuby 1.5 and suddenly all the world's maven artifacts would be installable as gems. It's a total game-changer for JRuby amongst Rubies; JRuby users would suddenly have several times more gems available to them than any other Ruby, simply because there's so many Java libraries out there. And because maven_gem and the Nexus plugin both name the gems with the dotted group.artifact-version, there's no chance of a naming conflict with any existing gems. At any rate, I think it's safe to say now that by the time we release JRuby 1.5, JRuby users will be able to search and install any Maven artifact as a RubyGem. That's so awesome. - Charlie --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
