jruby-maven-plugins icon indicating copy to clipboard operation
jruby-maven-plugins copied to clipboard

Normal groupId doesn't work

Open dain opened this issue 14 years ago • 4 comments

I'd like to be able to use a normal groupId with the gem-maven-plugin, but when I do the de.saumya.mojo.gem.GemArtifact class concats the groupId to the artifactId using a period and uses that for the Gem name. Apparently, period is not a legal for a gem name since when I try to install such a gem, I get:

ERROR: Could not find a valid gem 'blah-0.1.0.gem' (>= 0) in any repository

My guess is if you replace the periods with dashes in the final gem name (in the getGemName method), the gem will install.

dain avatar Apr 16 '11 01:04 dain

I patched the plugin, and added a pull request.

I sugest you also add support for a "gemName" property so a user can specify the exact name they want for the gem regardless of the maven GAV.

dain avatar Apr 16 '11 02:04 dain

We've worked with gems including these periods with no problem. For instance:

https://rubygems.org/gems/org.torquebox.vfs/versions/1.0.0.Beta23

I agree though, it results in some pretty ugly gem names, especially when using Java-style reverse-domain packaging/groupIds.

We ended up using <groupId>rubygems</groupId> and naming the gem like "torquebox-vfs".

When pushed to RubyGems, results in a saner:

https://rubygems.org/gems/torquebox-vfs

But that feels dirty from a Maven point-of-view.

What gem command are you using that is producing that error?

-Bob

On Apr 15, 2011, at 9:51 PM, dain wrote:

I'd like to be able to use a normal groupId with the gem-maven-plugin, but when I do the de.saumya.mojo.gem.GemArtifact class concats the groupId to the artifactId using a period and uses that for the Gem name. Apparently, period is not a legal for a gem name since when I try to install such a gem, I get:

ERROR: Could not find a valid gem 'blah-0.1.0.gem' (>= 0) in any repository

My guess is if you replace the periods with dashes in the final gem name (in the getGemName method), the gem will install.

Reply to this email directly or view it on GitHub: https://github.com/mkristian/jruby-maven-plugins/issues/9

bobmcwhirter avatar Apr 16 '11 02:04 bobmcwhirter

I agree, I like the gemName option to override any voodoo involving artifactId/groupId, since maven and gems don't always agree.

bobmcwhirter avatar Apr 16 '11 02:04 bobmcwhirter

Funny, I tried it again and the dots work fine. Must have had my environment messed up.

Anyway, I'll see if I can get the gemName idea implemented this weekend.

dain avatar Apr 16 '11 03:04 dain