de.saumya.mojo.gems
Class Maven2GemVersionConverter
java.lang.Object
de.saumya.mojo.gems.Maven2GemVersionConverter
public class Maven2GemVersionConverter
- extends Object
Class doing conversion from Maven "versioning space" into Ruby Gems "versioning space". The job is not trivial, since
Maven is much more liberal in accepting versions then Gems are.
- Author:
- cstamas, mkristian
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DUMMY_VERSION
public static final String DUMMY_VERSION
- See Also:
- Constant Field Values
DUMMY_PREFIX
public static final String DUMMY_PREFIX
- See Also:
- Constant Field Values
gemVersionPattern
public static final Pattern gemVersionPattern
- This is the pattern we match against. This is actually x.y.z... version format, that RubyGems 1.3.5 support.
http://github.com/jbarnette/rubygems/blob/REL_1_3_5/lib/rubygems/version.rb and ://github.com/jbarnette/rubygems/blob/REL_1_3_6/lib/rubygems/version.rb
Maven2GemVersionConverter
public Maven2GemVersionConverter()
createGemVersion
public String createGemVersion(String mavenVersion)
throws NullPointerException
- Creates valid GEM version out of Maven2 version. Gem versions are "stricter" than Maven versions: they are in
form of "x.y.z...". They have to start with integer, and be followed by a '.'. You can have as many like these
you want, but Maven version like "1.0-alpha-2" is invalid Gem version. Hence, some trickery has to be applied.
- Parameters:
mavenVersion -
- Returns:
-
- Throws:
NullPointerException
Copyright © 2011. All Rights Reserved.