Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command line option --inplace does not work #321

Open
matrei opened this issue Mar 16, 2024 · 1 comment
Open

Command line option --inplace does not work #321

matrei opened this issue Mar 16, 2024 · 1 comment

Comments

@matrei
Copy link
Contributor

matrei commented Mar 16, 2024

Steps to Reproduce

$ grails -V
Grails Version: 6.1.2
JVM Version: 11.0.16
$ mkdir myapp
$ cd myapp
$ grails create-app --inplace
Specify an application name or use --inplace to create an application in the current directory
Usage: grails create-app [-hivVx] [--list-features] [-g=GORM Implementation] [--jdk=<javaVersion>]
                         [-s=Servlet Implementation] [-t=TEST] [-f=FEATURE[,FEATURE...]]... [NAME]
Creates an application
      [NAME]            The name of the application to create.
  -f, --features=FEATURE[,FEATURE...]
                        The features to use. Possible values: asciidoctor, mockito, assertj,
                          testcontainers, spring-boot-starter-tomcat, cache-ehcache,
                          gorm-hibernate5, scaffolding, database-migration, mysql, cache, h2,
                          grails-gsp, spring-boot-devtools, grails-console, mongo-sync,
                          logbackGroovy, gorm-neo4j, micronaut-http-client,
                          spring-boot-starter-jetty, sqlserver, hamcrest, jrebel, embedded-mongodb,
                          asset-pipeline-grails, spring-boot-starter-undertow, views-markup,
                          micronaut-inject-groovy, gorm-mongodb, hibernate-validator, postgres,
                          grails-web-console, views-json, github-workflow-java-ci, shade, geb,
                          properties
  -g, --gorm=GORM Implementation
                        Which GORM Implementation to configure. Possible values: hibernate,
                          mongodb, neo4j.
  -h, --help            Show this help message and exit.
  -i, --inplace         Create a service using the current directory
      --jdk, --java-version=<javaVersion>
                        The JDK version the project should target
      --list-features   Output the available features and their descriptions
  -s, --servlet=Servlet Implementation
                        Which Servlet Implementation to configure. Possible values: none, tomcat,
                          jetty, undertow.
  -t, --test=TEST       Which test framework to use. Possible values: junit, spock.
  -v, --verbose         Create verbose output.
  -V, --version         Print version information and exit.
  -x, --stacktrace      Show full stack trace when exceptions occur.

Expected Behaviour

An application to be created in the myapp directory.

Actual Behaviour

The above info message is shown.

Environment Information

  • Operating System: Linux
  • Grails Version: 6.1.2
  • JDK Version: 11
@matrei
Copy link
Contributor Author

matrei commented Mar 16, 2024

If you specify an application name together with the --inplace option, it actually creates an application in the current directory.

However, this is not consistent with Grails CLI --inplace functionality of earlier versions of Grails where it used the current directory name as application name and default package.

Also, if it is required to provide an application name together with the --inplace option in Grails 6, the info message from the CLI is misleading:
Specify an application name or use --inplace to create an application in the current directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant