Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normal groupId doesn't work #9

Open
dain opened this issue Apr 16, 2011 · 4 comments
Open

Normal groupId doesn't work #9

dain opened this issue Apr 16, 2011 · 4 comments

Comments

@dain
Copy link

dain commented Apr 16, 2011

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
Copy link
Author

dain commented Apr 16, 2011

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.

@bobmcwhirter
Copy link
Contributor

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 rubygems 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
Copy link
Contributor

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

@dain
Copy link
Author

dain commented Apr 16, 2011

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants