Gabriel Dogaru (JIRA)
Thu, 19 Nov 2009 02:42:27 -0800
When interactive resolving all dependencies no dependencies get resolved ------------------------------------------------------------------------
Key: MRELEASE-503
URL: http://jira.codehaus.org/browse/MRELEASE-503
Project: Maven 2.x Release Plugin
Issue Type: Bug
Components: prepare
Affects Versions: 2.0-beta-9, Future
Environment: windows xp, maven 2.2.1, release plugin 2.0.9
Reporter: Gabriel Dogaru
Steps to reproduce:
* interactive resolve all dependencies
Dependency type to resolve,: specify the selection number ( 0:All 1:Project
Dependencies 2:Plugins 3:Reports 4:Extensions ): (0/1/2/3) 1:
* select 0
Even if I enter all the values correctly it says there are snapshot
dependencies.
I did some debugging and here is the problem:
in org.apache.maven.shared.release.phase.CheckDependencySnapshotsPhase.java in
the method
private void resolveSnapshots(Set projectDependencies, Set reportDependencies,
Set extensionDependencies,
Set pluginDependencies, ReleaseDescriptor
releaseDescriptor)
throws ReleaseExecutionException {
there is this peace of code:
case 0:
prompter.showMessage(RESOLVE_ALL_SNAPSHOT_MESSAGE);
snapshotSet.addAll(projectDependencies);
snapshotSet.addAll(reportDependencies);
snapshotSet.addAll(extensionDependencies);
snapshotSet.addAll(pluginDependencies);
resolvedSnapshots = processSnapshot(snapshotSet);
break;
The method processSnapshot removes the item from snapshotSet once it resolves
it.
After this method finishes the check is made that projectDependencies,
reportDependencies etc are empty. But they never get modified, instead
snapshotSet gets empty, but no one caries any more.
A solution I suggest is to use
case 0:
prompter.showMessage(RESOLVE_ALL_SNAPSHOT_MESSAGE);
resolvedSnapshots = new HashMap();
resolvedSnapshots.putAll(processSnapshot(projectDependencies));
resolvedSnapshots.putAll(processSnapshot(reportDependencies));
resolvedSnapshots.putAll(processSnapshot(extensionDependencies));
resolvedSnapshots.putAll(processSnapshot(pluginDependencies));
instead of the current code for case: 0 and remove the snapshotSet variable
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira