Skip to content
Browse files

Merge branch '2.2.x'

  • Loading branch information...
2 parents a2fdbc8 + 12770f5 commit bfae0364adcfdff37fba38a5bc307acedecec52e @graemerocher graemerocher committed Nov 19, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 scripts/_GrailsCreateArtifacts.groovy
View
10 scripts/_GrailsCreateArtifacts.groovy
@@ -80,11 +80,11 @@ createArtifact = { Map args = [:] ->
templateFile = new FileSystemResource("${basedir}/src/${templatePath}/${type ?: lastType}.groovy")
if (!templateFile.exists()) {
// now check for template provided by plugins
- def pluginTemplateFiles = resolveResources("file:${pluginsHome}/*/src/${templatePath}/${type ?: lastType}.groovy")
- if (pluginTemplateFiles) {
- templateFile = pluginTemplateFiles[0]
- }
- else {
+ def possibleResources = pluginSettings.pluginDirectories.collect { dir ->
+ new FileSystemResource("${dir.path}/src/templates/artifacts/${type ?: lastType}.groovy")
+ }
+ templateFile = possibleResources.find { it.exists() }
+ if (!templateFile) {
// template not found in application, use default template
templateFile = grailsResource("src/grails/${templatePath}/${type ?: lastType}.groovy")
}

0 comments on commit bfae036

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