@@ -18,7 +18,6 @@ package org.grails.cli.profile
1818import grails.io.IOUtils
1919import grails.util.BuildSettings
2020import grails.util.CosineSimilarity
21- import groovy.transform.CompileDynamic
2221import groovy.transform.CompileStatic
2322import groovy.transform.ToString
2423import jline.console.completer.ArgumentCompleter
@@ -36,9 +35,6 @@ import org.grails.config.NavigableMap
3635import org.grails.io.support.Resource
3736import org.yaml.snakeyaml.Yaml
3837
39- import java.util.regex.Matcher
40-
41-
4238/**
4339 * Abstract implementation of the profile class
4440 *
@@ -60,11 +56,13 @@ abstract class AbstractProfile implements Profile {
6056 protected List<String > buildRepositories = []
6157 protected List<String > buildPlugins = []
6258 protected List<String > buildExcludes = []
59+ protected List<String > skeletonExcludes = []
6360 protected final List<Command > internalCommands = []
6461 protected List<String > buildMerge = null
6562 protected List<Feature > features = []
6663 protected Set<String > defaultFeaturesNames = []
6764 protected Set<String > requiredFeatureNames = []
65+ protected String parentTargetFolder
6866 final ClassLoader classLoader
6967 protected ExclusionDependencySelector exclusionDependencySelector = new ExclusionDependencySelector ()
7068 protected String description = " " ;
@@ -201,7 +199,8 @@ abstract class AbstractProfile implements Profile {
201199 this . buildPlugins = (List<String > )navigableConfig. get(" build.plugins" , [])
202200 this . buildExcludes = (List<String > )navigableConfig. get(" build.excludes" , [])
203201 this . buildMerge = (List<String > )navigableConfig. get(" build.merge" , null )
204-
202+ this . parentTargetFolder = (String )navigableConfig. get(" skeleton.parent.target" , null )
203+ this . skeletonExcludes = (List<String > )navigableConfig. get(" skeleton.excludes" , [])
205204 }
206205
207206 String getDescription () {
@@ -472,4 +471,22 @@ abstract class AbstractProfile implements Profile {
472471
473472 }
474473 }
474+
475+ @Override
476+ String getParentSkeletonDir () {
477+ this . parentTargetFolder
478+ }
479+
480+ @Override
481+ File getParentSkeletonDir (File parent ) {
482+ if (parentSkeletonDir) {
483+ new File (parent, parentSkeletonDir)
484+ } else {
485+ parent
486+ }
487+ }
488+
489+ List<String > getSkeletonExcludes () {
490+ this . skeletonExcludes
491+ }
475492}
0 commit comments