buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <alex.boisv...@gmail.com>
Subject Re: Invalid Version error when spec contains a version like r09
Date Tue, 15 Nov 2011 11:16:46 GMT
On Tue, Nov 15, 2011 at 6:13 AM, Alex Boisvert <alex.boisvert@gmail.com>wrote:

> On Mon, Nov 14, 2011 at 3:18 PM, Russ Teabeault <rteabeault@rallydev.com>wrote:
>
>> Consider the following namespace code:
>>
>>  REQUIRES = ArtifactNamespace.for(self) do |ns|
>>    ns.guava! "com.google.guava:guava:jar:r09"
>>    ns.javassist! "javassist:javassist:jar:3.8.0.GA"
>>    ns.reflections! "org.reflections:reflections:jar:0.9.5-RC1"
>>  end
>>
>> The guava spec here causes the following error to be raised
>>
>>  Invalid version: "r09"
>>
>> This is a result of VersionRequirement.version? which checks the version
>> string against the regex
>>
>>  /^\s*\d[#{VER_CHARS}]*\s*$/
>>
>> This regex is checked here
>>
>>  raise "Invalid version: #{version.inspect}" unless
>> self.class.version?(version)
>>
>> So it seems that maybe this regex could be expanded to include versions
>> like 'r09'.  And for that matter what denotes a valid version and what is
>> this check trying to protect against.  Can that check just be removed?
>>
>
> Yes, the check should be removed to maintain full Maven interoperability.
>  I'll commit a fix when I get time.
>

Created a tracker: https://issues.apache.org/jira/browse/BUILDR-615

alex

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message