Package: org.grails.cli.profile.commands

## [Groovy] Class CreateAppCommand

- org.grails.cli.profile.commands.CreateAppCommand

- All Implemented Interfaces and Traits:
    ProfileRepositoryAware

      @groovy.transform.CompileStatic
      class CreateAppCommand
      extends ArgumentCompletingCommand
      implements ProfileRepositoryAware

  Command for creating Grails applications

  Authors:
    Graeme Rocher
    Lari Hotari
  Since:
    3.0

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `class` | `CreateAppCommand.1` |
    `static class` | `CreateAppCommand.CreateAppCommandObject` |

  - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `protected static java.lang.String` | `APPLICATION_YML` |
    `protected static java.lang.String` | `BUILD_GRADLE` |
    `static java.lang.String` | `ENCODING` |
    `static java.lang.String` | `FEATURES_FLAG` |
    `protected static java.lang.String` | `GRADLE_PROPERTIES` |
    `private static java.lang.String` | `GRAILS_VERSION_FALLBACK_IN_IDE_ENVIRONMENTS_FOR_RUNNING_TESTS` |
    `static java.lang.String` | `INPLACE_FLAG` |
    `static java.lang.String` | `NAME` |
    `static java.lang.String` | `PROFILE_FLAG` |
    `static java.lang.String` | `UNZIP_PROFILE_TEMP_DIR` |
    `private java.lang.String` | `appname` |
    `private java.lang.String` | `defaultpackagename` |
    `private CommandDescription` | `description` |
    `private java.lang.String` | `groupname` |
    `private ProfileRepository` | `profileRepository` |
    `private java.io.File` | `targetDirectory` |
    `private java.util.Map<java.net.URL, java.io.File>` | `unzippedDirectories` |
    `private java.util.Map<java.lang.String, java.lang.String>` | `variables` |

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class ArgumentCompletingCommand` | `cliParser`

  - ### Properties Summary

    Properties
    Type | Name and description
    --- | ---
    `java.lang.String` | `appname`
    `java.lang.String` | `defaultpackagename`
    `CommandDescription` | `description`
    `java.lang.String` | `groupname`
    `ProfileRepository` | `profileRepository`
    `java.io.File` | `targetDirectory`
    `java.util.Map<java.lang.String, java.lang.String>` | `variables`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `CreateAppCommand ()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `protected void` | `appendFeatureFiles(java.io.File skeletonDir)`
    `` | `private void` | `appendToYmlSubDocument(java.io.File applicationYmlFile, java.lang.String previousApplicationYml)`
    `` | `private void` | `appendToYmlSubDocument(java.io.File applicationYmlFile, java.lang.String previousApplicationYml, java.io.File setTo)`
    `` | `protected void` | `buildTargetFolders(Profile profile, java.util.Map<Profile, java.io.File> targetDir, java.io.File projectDir)`
    `` | `protected int` | `complete(CommandLine commandLine, CommandDescription desc, java.util.List<java.lang.CharSequence> candidates, int cursor)`
    `` | `protected java.util.List<GradleDependency>` | `convertToGradleDependencies(java.util.List<org.eclipse.aether.graph.Dependency> dependencies)`
    `` | `private void` | `copySkeleton(Profile profile, Profile participatingProfile)`
    `` | `protected void` | `copySrcToTarget(GrailsConsoleAntBuilder ant, java.io.File srcDir, java.util.List excludes, java.util.Set<java.lang.String> binaryFileExtensions)`
    `` | `protected java.lang.String` | `createNewApplicationYml(java.lang.String previousYml, java.lang.String newYml)`
    `` | `private java.lang.String` | `createValidPackageName()`
    `` | `private void` | `deleteDirectory(java.io.File directory)`
    `` | `private java.lang.String` | `establishGroupAndAppName(java.lang.String groupAndAppName)`
    `` | `protected java.lang.Iterable<Feature>` | `evaluateFeatures(Profile profile, java.util.List<java.lang.String> requestedFeatures)`
    `` | `protected java.lang.String` | `evaluateProfileName(CommandLine mainCommandLine)`
    `` | `java.util.Set<java.io.File>` | `findAllFilesByName(java.io.File projectDir, java.lang.String fileName)`
    `` | `protected java.lang.String` | `getDefaultProfile()`
    `` | `protected java.io.File` | `getDestinationDirectory(java.io.File srcFile)`
    `` | `java.lang.String` | `getName()`
    `` | `boolean` | `handle(CreateAppCommand.CreateAppCommandObject cmd)`
    `` | `boolean` | `handle(ExecutionContext executionContext)`
    `` | `protected boolean` | `initializeGroupAndName(java.lang.String appName, boolean inplace)`
    `` | `private void` | `initializeVariables(java.lang.String profileName, java.lang.String grailsVersion)`
    `` | `private boolean` | `isDirectoryEmpty(java.io.File target)`
    `` | `protected void` | `populateDescription()`
    `` | `protected void` | `replaceBuildTokens(java.lang.String profileCoords, Profile profile, java.util.List<Feature> features, java.io.File targetDirectory)`
    `` | `protected java.lang.String` | `resolveArtifactString(org.springframework.boot.cli.compiler.dependencies.Dependency dep)`
    `` | `protected java.io.File` | `unzipProfile(groovy.util.AntBuilder ant, Resource location)`
    `` | `protected boolean` | `validateProfile(Profile profileInstance, java.lang.String profileName)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class ArgumentCompletingCommand` | `complete, complete`

- - ### Field Detail

    - #### protected static final java.lang.String APPLICATION_YML

    - #### protected static final java.lang.String BUILD_GRADLE

    - #### public static final java.lang.String ENCODING

    - #### public static final java.lang.String FEATURES_FLAG

    - #### protected static final java.lang.String GRADLE_PROPERTIES

    - #### private static final java.lang.String GRAILS_VERSION_FALLBACK_IN_IDE_ENVIRONMENTS_FOR_RUNNING_TESTS

    - #### public static final java.lang.String INPLACE_FLAG

    - #### public static final java.lang.String NAME

    - #### public static final java.lang.String PROFILE_FLAG

    - #### public static final java.lang.String UNZIP_PROFILE_TEMP_DIR

    - #### private java.lang.String appname

    - #### private java.lang.String defaultpackagename

    - #### private CommandDescription description

    - #### private java.lang.String groupname

    - #### private ProfileRepository profileRepository

    - #### private java.io.File targetDirectory

    - #### private java.util.Map<java.net.URL, java.io.File> unzippedDirectories

    - #### private java.util.Map<java.lang.String, java.lang.String> variables

  - ### Property Detail

    - #### java.lang.String appname

    - #### java.lang.String defaultpackagename

    - #### CommandDescription description

    - #### java.lang.String groupname

    - #### ProfileRepository profileRepository

    - #### java.io.File targetDirectory

    - #### java.util.Map<java.lang.String, java.lang.String> variables

  - ### Constructor Detail

    - #### CreateAppCommand()

  - ### Method Detail

    - #### protected void appendFeatureFiles(java.io.File skeletonDir)

    - #### private void appendToYmlSubDocument(java.io.File applicationYmlFile, java.lang.String previousApplicationYml)

    - #### private void appendToYmlSubDocument(java.io.File applicationYmlFile, java.lang.String previousApplicationYml, java.io.File setTo)

    - #### protected void buildTargetFolders(Profile profile, java.util.Map<Profile, java.io.File> targetDir, java.io.File projectDir)

    - #### @java.lang.Override protected int complete(CommandLine commandLine, CommandDescription desc, java.util.List<java.lang.CharSequence> candidates, int cursor)

    - #### protected java.util.List<GradleDependency> convertToGradleDependencies(java.util.List<org.eclipse.aether.graph.Dependency> dependencies)

    - #### @groovy.transform.CompileStatic(value: TypeCheckingMode.SKIP) private void copySkeleton(Profile profile, Profile participatingProfile)

    - #### @groovy.transform.CompileDynamic protected void copySrcToTarget(GrailsConsoleAntBuilder ant, java.io.File srcDir, java.util.List excludes, java.util.Set<java.lang.String> binaryFileExtensions)

    - #### protected java.lang.String createNewApplicationYml(java.lang.String previousYml, java.lang.String newYml)

    - #### private java.lang.String createValidPackageName()

    - #### private void deleteDirectory(java.io.File directory)

    - #### private java.lang.String establishGroupAndAppName(java.lang.String groupAndAppName)

    - #### protected java.lang.Iterable<Feature> evaluateFeatures(Profile profile, java.util.List<java.lang.String> requestedFeatures)

    - #### protected java.lang.String evaluateProfileName(CommandLine mainCommandLine)

    - #### java.util.Set<java.io.File> findAllFilesByName(java.io.File projectDir, java.lang.String fileName)

    - #### protected java.lang.String getDefaultProfile()

    - #### protected java.io.File getDestinationDirectory(java.io.File srcFile)

    - #### @java.lang.Override java.lang.String getName()

    - #### boolean handle(CreateAppCommand.CreateAppCommandObject cmd)

    - #### @java.lang.Override boolean handle(ExecutionContext executionContext)

    - #### protected boolean initializeGroupAndName(java.lang.String appName, boolean inplace)

    - #### private void initializeVariables(java.lang.String profileName, java.lang.String grailsVersion)

    - #### private boolean isDirectoryEmpty(java.io.File target)

    - #### protected void populateDescription()

    - #### @groovy.transform.CompileDynamic protected void replaceBuildTokens(java.lang.String profileCoords, Profile profile, java.util.List<Feature> features, java.io.File targetDirectory)

    - #### protected java.lang.String resolveArtifactString(org.springframework.boot.cli.compiler.dependencies.Dependency dep)

    - #### @groovy.transform.CompileDynamic protected java.io.File unzipProfile(groovy.util.AntBuilder ant, Resource location)

    - #### protected boolean validateProfile(Profile profileInstance, java.lang.String profileName)