Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch '2.1.x' into 2.2.x

  • Loading branch information...
commit 12770f55cff881c095295fc5404b7414e8655d32 2 parents eacd706 + e5d0ca1
@graemerocher graemerocher authored
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 12770f5

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