You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2015/10/28 19:54:06 UTC
[2/2] incubator-groovy git commit: GROOVY-7649: Grape.resolve()
always fails after first unresolved dependency (closes #164)
GROOVY-7649: Grape.resolve() always fails after first unresolved dependency (closes #164)
clean up current dependencies state when resolve fails
Project: http://git-wip-us.apache.org/repos/asf/incubator-groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-groovy/commit/76e9104f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-groovy/tree/76e9104f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-groovy/diff/76e9104f
Branch: refs/heads/GROOVY_2_4_X
Commit: 76e9104ff1413a221985e8550df0e35d8a7cc993
Parents: 783d9b6
Author: Jason Plurad <pl...@apache.org>
Authored: Wed Oct 28 06:17:22 2015 -0700
Committer: pascalschumacher <pa...@gmx.net>
Committed: Wed Oct 28 19:53:48 2015 +0100
----------------------------------------------------------------------
src/main/groovy/grape/GrapeIvy.groovy | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-groovy/blob/76e9104f/src/main/groovy/grape/GrapeIvy.groovy
----------------------------------------------------------------------
diff --git a/src/main/groovy/grape/GrapeIvy.groovy b/src/main/groovy/grape/GrapeIvy.groovy
index ef12154..d5ada65 100644
--- a/src/main/groovy/grape/GrapeIvy.groovy
+++ b/src/main/groovy/grape/GrapeIvy.groovy
@@ -564,7 +564,15 @@ class GrapeIvy implements GrapeEngine {
// err on the side of using the class already loaded into the
// classloader rather than adding another jar of the same module
// with a different version
- ResolveReport report = getDependencies(args, *localDeps.asList().reverse())
+ ResolveReport report = null
+ try {
+ report = getDependencies(args, *localDeps.asList().reverse())
+ } catch (Exception e) {
+ // clean-up the state first
+ localDeps.removeAll(grabRecordsForCurrDependencies)
+ grabRecordsForCurrDependencies.clear()
+ throw e
+ }
List<URI> results = []
for (ArtifactDownloadReport adl in report.allArtifactsReports) {