Skip to content

Commit 75e7336

Browse files
committed
Fix regression on spring/resources where duplicate config values were removed from the classpath
1 parent 5f94d86 commit 75e7336

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

grails-gradle/plugins/src/main/groovy/org/grails/gradle/plugin/core/GrailsPluginGradlePlugin.groovy

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ class GrailsPluginGradlePlugin extends GrailsGradlePlugin {
234234
'application.yml',
235235
'logback.groovy',
236236
'logback.xml',
237-
'logback-spring.xml'
237+
'logback-spring.xml',
238+
// Plugins must not ship spring/resources.groovy (use doWithSpring instead),
239+
// but it must remain in build/resources/main/ so it is on the integration
240+
// test classpath for plugin modules that test their own resources.groovy.
241+
'spring/resources.groovy'
238242
)
239243
}
240244
}
@@ -258,7 +262,8 @@ class GrailsPluginGradlePlugin extends GrailsGradlePlugin {
258262
processResources.setDuplicatesStrategy(DuplicatesStrategy.INCLUDE)
259263
processResources.dependsOn(*processResourcesDependencies)
260264
project.processResources {
261-
exclude('spring/resources.groovy')
265+
// spring/resources.groovy is excluded from the published jar (see configureJarTask)
266+
// but is allowed into build/resources/main/ so plugin integration tests can load it.
262267
exclude('**/*.gsp')
263268
}
264269
}

0 commit comments

Comments
 (0)