[ https://jira.codehaus.org/browse/MNG-3454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Benedict updated MNG-3454: ------------------------------- Fix Version/s: (was: Issues to be reviewed for 3.x) > processing a relocation erases requested version range > ------------------------------------------------------ > > Key: MNG-3454 > URL: https://jira.codehaus.org/browse/MNG-3454 > Project: Maven > Issue Type: Bug > Components: Artifacts and Repositories > Affects Versions: 2.0.5, 2.0.6, 2.0.7, 2.0.8 > Reporter: brianfox brianfox > Priority: Minor > Attachments: MNG-2861_broken.zip, MNG-2861.tar.gz > > > While fixing MNG-2861, I came across a weird scenario where the contents of > the relocation can affect what happens. In 2861, the relocation did not > specify a version, only a group id. However, if a version is specified, in > MavenMetadataSource: 164 the versionRange is reset to the contents of the > relocation.getVersion(). This effectively tosses out the requested range > information. We only get here after selecting the version that has been > relocated, but now we have a recommended version, which can cause a different > version to be selected. See the two sample projects in MNG-2861 to see how > the handling is different. (brett's version has the version in the relocation > and thus expresses the behavior described here) > The fix is simple, change the line to: > if ( relocation.getVersion() != null ) > { > //we don't want to blast the versionRange > information > artifact.selectVersion( relocation.getVersion() ); > } > however, I'm not certain what the ramifications of this are. The potential > exists for having selected a version that no longer matches the requested > version range. Say the version range was [1.0,2.0] and 2.0 was relocated to > 3.0. The fix to 2861 involves reloading the available versions from the > relocated artifact. This means that there is no not an artifact to match > 1.0-2.0 and who knows what's going to happen. > I'm choosing to document this and not fix it for now due to the risk of > instability. A search of open issues didn't result in anyone experiencing > trouble with this. -- This message was sent by Atlassian JIRA (v6.1.6#6162)