My example below is slightly misleading. In the call to containsVersion() I am actually passing a proper ArtifactVersion not a string...I was trying to illustrate the contents of that param.
-----Original Message----- From: Brian E. Fox [mailto:[EMAIL PROTECTED] Sent: Sunday, February 18, 2007 8:15 PM To: Maven Developers List Subject: version range question According to the javadoc for VersionRange.createFromVersionSpec, a singular version (ie "2.0.4") is allowed: /** * Create a version range from a string representation * * Some spec examples are * <ul> * <li><code>1.0</code> Version 1.0</li> * <li><code>[1.0,2.0)</code> Versions 1.0 (included) to 2.0 (not included)</li> * <li><code>[1.0,2.0]</code> Versions 1.0 to 2.0 (both included)</li> * <li><code>[1.5,)</code> Versions 1.5 and higher</li> * <li><code>(,1.0],[1.2,)</code> Versions up to 1.0 (included) and 1.2 or higher</li> * </ul> * * @param spec string representation of a version or version range * @return a new [EMAIL PROTECTED] VersionRange} object that represents the spec * @throws InvalidVersionSpecificationException */ However, if I create a version range using createFromVersionSpec("2.0.4") and then call, vr.containsVersion(2.0.5) the result is true. However, if I use createFromVersion("2.0.4") and then use vr.containsVersion("2.0.5"), I get the expected false. So is this a bug in the Spec method? What is the difference between the two supposed to be? It seems like the fromVersion method can handle the spec strings also so I'm confused why there are two. Thanks, Brian --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]