Skip to content
Browse files

Fix related to GRAILS-6321, should not disable all repositories when …

…inherit false
  • Loading branch information...
1 parent fd44736 commit e7324e58d6753803719d6d5ad7dae79944290a15 @graemerocher graemerocher committed
View
17 src/java/org/codehaus/groovy/grails/resolve/IvyDependencyManager.groovy
@@ -870,15 +870,16 @@ class IvyDomainSpecificLanguageEvaluator {
}
private addToChainResolver(org.apache.ivy.plugins.resolver.DependencyResolver resolver) {
- if(inheritRepositories) {
- if (transferListener !=null && (resolver instanceof RepositoryResolver)) {
- ((RepositoryResolver)resolver).repository.addTransferListener transferListener
- }
- // Fix for GRAILS-5805
- synchronized(chainResolver.resolvers) {
- chainResolver.add resolver
- }
+ if(currentPluginBeingConfigured && !inheritRepositories) return
+
+ if (transferListener !=null && (resolver instanceof RepositoryResolver)) {
+ ((RepositoryResolver)resolver).repository.addTransferListener transferListener
}
+ // Fix for GRAILS-5805
+ synchronized(chainResolver.resolvers) {
+ chainResolver.add resolver
+ }
+
}
void grailsPlugins() {
View
6 src/test/org/codehaus/groovy/grails/resolve/IvyDependencyManagerTests.groovy
@@ -39,6 +39,7 @@ class IvyDependencyManagerTests extends GroovyTestCase {
manager.parseDependencies {
repositories {
inherit true
+ ebr()
}
}
@@ -49,7 +50,7 @@ class IvyDependencyManagerTests extends GroovyTestCase {
}
- assert 1 == manager.chainResolver.resolvers.size()
+ assert 3 == manager.chainResolver.resolvers.size()
manager = new IvyDependencyManager("test", "0.1",settings)
@@ -57,6 +58,7 @@ class IvyDependencyManagerTests extends GroovyTestCase {
manager.parseDependencies {
repositories {
inherit false
+ ebr()
}
}
@@ -66,7 +68,7 @@ class IvyDependencyManagerTests extends GroovyTestCase {
}
}
- assert 0 == manager.chainResolver.resolvers.size()
+ assert 2 == manager.chainResolver.resolvers.size()
}
void testChanging() {
def settings = new BuildSettings()

0 comments on commit e7324e5

Please sign in to comment.
Something went wrong with that request. Please try again.