Update properties goal searches version range only forward (update parent goal goes backward as well) -----------------------------------------------------------------------------------------------------
Key: MVERSIONS-158 URL: https://jira.codehaus.org/browse/MVERSIONS-158 Project: Maven 2.x Versions Plugin Issue Type: Bug Affects Versions: 1.2 Reporter: ntumba lobo I am using the goals "update-parent" and "update-properties" to modify versions in my pom files while performing an automated release. However both goals dont behave exactly the same way. Let's say I have in a pom file parent.version=1.5-SNAPSHOT and a property myproperty.version=1.5-SNAPSHOT. Assume I am doing a release and for that parent.version and myproperty.version become 1.5-12. Now I want to go back to the 1.5-SNAPSHOT version for parent and myproperty after a release. The valid versions for both are [1.5-SNAPSHOT,1.5-10,1.5-12]. When I specify a version range parentVersion=(,1.5-SNAPSHOT] myproperty.version=(,1.5-SNAPSHOT]. It is fine for parent but it always fails for myproperty. The parent allows to search the provided range backward and foreward but for the property the search is only forward and is never resolved to 1.5-SNAPSHOT. I think this is a discrepancy. Both update-parent and update-property should behave consistently and search for the full range provided. I changed the plugin source code for my project for the "update-properties" goal to search backward as well. I have made a change in org.codehaus.mojo.versions.api.PropertyVersions.getNewestVersion() I changed the the call to getNewestVersion() to be as follows (similar to update-parent goal) ArtifactVersion result = getNewestVersion( range, null, null, includeSnapshots, true, true ); -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email