Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions grails-doc/src/en/guide/commandLine/creatingProject.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ After generating a project with Forge, switch to the created directory and use t
[none]
* -jdk, --java-version
* -s, --servlet
* -g, --gorm
* -d, --data (-g, --gorm are legacy aliases)
* -t, --test
* -f, --features
* -i, --inplace
Expand All @@ -61,7 +61,7 @@ After generating a project with Forge, switch to the created directory and use t
./grails -t forge create-app \
--servlet=tomcat \
--jdk=11 \
--gorm=hibernate \
--data=hibernate5 \
--test=spock \
--features=github-workflow-java-ci \
com.example.demo
Expand All @@ -73,7 +73,7 @@ After generating a project with Forge, switch to the created directory and use t
[none]
* -jdk, --java-version
* -s, --servlet
* -g, --gorm
* -d, --data (-g, --gorm are legacy aliases)
* -t, --test
* -f, --features
* -i, --inplace
Expand All @@ -83,7 +83,7 @@ After generating a project with Forge, switch to the created directory and use t
./grails -t forge create-restapi \
--servlet=tomcat \
--jdk=11 \
--gorm=hibernate \
--data=hibernate5 \
--test=spock \
--features=github-workflow-java-ci \
com.example.demo
Expand All @@ -95,7 +95,7 @@ After generating a project with Forge, switch to the created directory and use t
[none]
* -jdk, --java-version
* -s, --servlet
* -g, --gorm
* -d, --data (-g, --gorm are legacy aliases)
* -t, --test
* -f, --features
* -i, --inplace
Expand All @@ -105,7 +105,7 @@ After generating a project with Forge, switch to the created directory and use t
./grails -t forge create-plugin \
--servlet=tomcat \
--jdk=11 \
--gorm=hibernate \
--data=hibernate5 \
--test=spock \
--features=github-workflow-java-ci \
com.example.demo
Expand All @@ -117,7 +117,7 @@ After generating a project with Forge, switch to the created directory and use t
[none]
* -jdk, --java-version
* -s, --servlet
* -g, --gorm
* -d, --data (-g, --gorm are legacy aliases)
* -t, --test
* -f, --features
* -i, --inplace
Expand All @@ -127,7 +127,7 @@ After generating a project with Forge, switch to the created directory and use t
./grails -t forge create-web-plugin \
--servlet=tomcat \
--jdk=11 \
--gorm=hibernate \
--data=hibernate5 \
--test=spock \
--features=github-workflow-java-ci \
com.example.demo
Expand All @@ -136,7 +136,7 @@ After generating a project with Forge, switch to the created directory and use t

=== The `create-` command flags

The "create-*" commands are used to produce a fundamental Grails project, allowing for the inclusion of optional flags to select additional features, to customize GORM settings, an embedded servlet, the test framework, and the Java version.
The "create-*" commands are used to produce a fundamental Grails project, allowing for the inclusion of optional flags to select additional features, to customize Grails Data settings, an embedded servlet, the test framework, and the Java version.

[cols="4,8,6a"]
|===
Expand All @@ -158,12 +158,12 @@ The "create-*" commands are used to produce a fundamental Grails project, allowi
--servlet=tomcat
----

| -g, --gorm
| Which GORM Implementation to configure. Possible values: hibernate, mongodb, neo4j.
| -d, --data (-g, --gorm are legacy aliases)
| Which Grails Data implementation to configure. Possible values: hibernate5, hibernate7, mongodb. The value hibernate is accepted as a legacy alias for hibernate5.
|
[source,shell]
----
--gorm hibernate
--data hibernate5
----

| -t, --test
Expand All @@ -175,7 +175,7 @@ The "create-*" commands are used to produce a fundamental Grails project, allowi
----

| -f, --features
| The features to use. Possible values: h2, gorm-hibernate5, spring-boot-starter-jetty, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, grails-web-console, logbackGroovy, mongo-sync, shade, properties
| The features to use. Possible values: h2, gorm-hibernate5, gorm-hibernate7, spring-boot-starter-jetty, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, grails-web-console, logbackGroovy, mongo-sync, shade, properties
|
[source,shell]
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ under the License.
The `create-app` command is available in both the Grails Shell CLI and the Forge CLI.

- Use `grails create-app myapp` to generate a default project using the Grails Shell CLI. This is the most common usage.
- Use `grails -t forge create-app myapp` to access advanced application generation options such as `--jdk`, `--gorm`, and other Forge-only flags.
- Use `grails -t forge create-app myapp` to access advanced application generation options such as `--jdk`, `--data`, and other Forge-only flags.
The example below assumes you are using the Forge CLI, which is solely intended for **application generation**. It does not support running, building, or managing a Grails application.

Expand Down
15 changes: 8 additions & 7 deletions grails-doc/src/en/guide/commandLine/interactiveMode.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -61,23 +61,23 @@ You can access general usage information for Grails commands using the help flag
[source,shell]
----
grails> create-app -h
Usage: grails create-app [-hivVx] [--list-features] [-g=GORM Implementation] [--jdk=<javaVersion>]
Usage: grails create-app [-hivVx] [--list-features] [-d=Grails Data 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: h2, scaffolding, gorm-hibernate5,
spring-boot-starter-jetty, spring-boot-starter-tomcat,
gorm-hibernate7, spring-boot-starter-jetty, spring-boot-starter-tomcat,
micronaut-http-client, cache-ehcache, hibernate-validator, postgres,
mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb,
assertj, mockito, spring-boot-starter-undertow,
github-workflow-java-ci, jrebel, testcontainers, sqlserver,
grails-console, views-markup, asset-pipeline-grails, views-json,
gorm-neo4j, asciidoctor, grails-web-console,
logbackGroovy, mongo-sync, shade, geb, properties
-g, --gorm=GORM Implementation
Which GORM Implementation to configure. Possible values: hibernate,
mongodb, neo4j.
-d, --data, -g, --gorm=Grails Data Implementation
Which Grails Data implementation to configure (-g, --gorm are legacy
aliases). Possible values: hibernate5, hibernate7, mongodb.
-h, --help Show this help message and exit.
-i, --inplace Create a service using the current directory
--jdk, --java-version=<javaVersion>
Expand Down Expand Up @@ -116,8 +116,9 @@ Available Features

Database
database-migration Adds support for Liquibase database migrations. The Database Migration plugin helps you manage database changes while developing Grails applications.
gorm-hibernate5 (+) Adds support for Hibernate5 using GORM
gorm-mongodb Configures GORM for MongoDB for Groovy applications
gorm-hibernate5 (+) Configure Grails Data for using Hibernate 5.
gorm-hibernate7 Configure Grails Data for using Hibernate 7.
gorm-mongodb Configure Grails Data for using MongoDB.
gorm-neo4j Configures GORM for Neo4j for Groovy applications
h2 (+) Adds the H2 driver and default config
mongo-sync Adds support for the MongoDB Synchronous Driver
Expand Down
14 changes: 14 additions & 0 deletions grails-doc/src/en/guide/introduction/whatsNew.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,20 @@ This brings the Spring Boot 4 modular artifact layout, Spring Framework 7 API re

The Grails 8 upgrade guide calls out the major application-impacting changes and links to the Spring Boot 4.0 migration guide, Spring Boot 4.1 release notes and Spring Framework 7.0 release notes.

==== Hibernate 7 Application Generation

Grails Forge can now generate applications configured for Grails Data with Hibernate 7.
The `create-*` commands also accept a new `-d, --data` option (the previous `-g` and `--gorm` flags remain supported as legacy aliases) with the values `hibernate5`, `hibernate7`, and `mongodb`; the legacy value `hibernate` is still accepted and selects Hibernate 5:

[source,console]
----
grails -t forge create-app --data=hibernate7 com.example.demo
----

Applications generated for Hibernate 7 consume `grails-hibernate7-bom` — or `grails-hibernate7-micronaut-bom` when combined with the `grails-micronaut` feature — consistently across the application dependencies, the buildscript classpath, and `buildSrc`.
This avoids the dependency resolution conflicts that occur when an application generated for Hibernate 5 is manually switched to `grails-data-hibernate7` while the default `grails-bom` remains on the build classpath.
The `database-migration` feature also selects the matching `grails-data-hibernate7-dbmigration` plugin automatically.

==== Plugin Beans Register Before Spring Boot Auto-Configuration

Grails {grailsMajorVersion} unifies and retimes the plugin lifecycle so that the beans a plugin contributes are registered before Spring Boot processes its auto-configurations.
Expand Down
12 changes: 6 additions & 6 deletions grails-doc/src/en/ref/Command Line/create-app.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ In Grails {grailsMajorVersion}, `create-app` is available in both the **Grails S

- Most users should use the **Grails Shell CLI** by default (`grails create-app bookstore`). This version supports core development commands and project lifecycle management, and includes basic `create-*` flags like `--inplace`, `--features`, and `--profile`.

- The **Forge CLI** (`grails -t forge create-app bookstore`) is intended solely for **application generation** with extended configuration flags such as `--jdk`, `--gorm`, and `--servlet`.
- The **Forge CLI** (`grails -t forge create-app bookstore`) is intended solely for **application generation** with extended configuration flags such as `--jdk`, `--data`, and `--servlet`.

Forge-specific flags will result in an error if used with the Shell CLI.
====
Expand All @@ -50,7 +50,7 @@ This uses the **Forge CLI** to generate an application with extended configurati
----
$ grails -t forge create-app bookstore \
--jdk=17 \
--gorm=hibernate \
--data=hibernate5 \
--servlet=tomcat \
--test=spock \
--features=asciidoctor,github-workflow-java-ci
Expand All @@ -61,8 +61,8 @@ $ grails -t forge create-app bookstore \
These options are available only when using `grails -t forge`:

- `NAME`: The desired name for the application.
- `-f, --features=FEATURE[,FEATURE...]`: Enable features like `gorm-hibernate5`, `postgres`, `asciidoctor`, `grails-gsp`, etc.
- `-g, --gorm=GORM Implementation`: Choose GORM implementation: `hibernate`, `mongodb`, `neo4j`.
- `-f, --features=FEATURE[,FEATURE...]`: Enable features like `gorm-hibernate5`, `gorm-hibernate7`, `postgres`, `asciidoctor`, `grails-gsp`, etc.
- `-d, --data=Grails Data Implementation` (`-g`, `--gorm` are legacy aliases): Choose the Grails Data implementation: `hibernate5`, `hibernate7`, `mongodb`.
- `--jdk=<javaVersion>`: Target JDK version (e.g., 11 or 17).
- `-s, --servlet=Servlet Implementation`: Choose embedded servlet: `tomcat`, `jetty`, `undertow`, `none`.
- `-t, --test=TEST`: Select test framework: `spock`, `junit`.
Expand All @@ -83,7 +83,7 @@ Available flags:
- `--features` _(limited support depending on profile)_
- `--profile`

Forge-only options such as `--jdk`, `--gorm`, or `--servlet` are **not supported** in the Shell CLI.
Forge-only options such as `--jdk`, `--data`, or `--servlet` are **not supported** in the Shell CLI.

=== Examples

Expand All @@ -101,7 +101,7 @@ $ cd bookstore
----
$ grails -t forge create-app bookstore \
--jdk=17 \
--gorm=hibernate \
--data=hibernate5 \
--features=asciidoctor,grails-gsp
----

Expand Down
12 changes: 6 additions & 6 deletions grails-doc/src/en/ref/Command Line/create-plugin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ grails create-plugin [OPTIONS] NAME

- `NAME`: The desired name for the Grails plugin.

Options include specifying features, configuring the GORM implementation, selecting a servlet implementation, choosing a test framework, setting the JDK version, and more. You can tailor your Grails plugin to your specific requirements using these options.
Options include specifying features, configuring the Grails Data implementation, selecting a servlet implementation, choosing a test framework, setting the JDK version, and more. You can tailor your Grails plugin to your specific requirements using these options.

=== Options

Here are the available options for the create-plugin command:

- -f, --features=FEATURE[,FEATURE...]: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, grails-web-console, logbackGroovy, mongo-sync, shade, properties.
- -g, --gorm=GORM Implementation: Specifies the GORM Implementation to configure for the plugin. Possible values are hibernate, mongodb, neo4j.
- -f, --features=FEATURE[,FEATURE...]: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, gorm-hibernate7, spring-boot-starter-jetty, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, grails-web-console, logbackGroovy, mongo-sync, shade, properties.
- -d, --data=Grails Data Implementation (-g, --gorm are legacy aliases): Specifies the Grails Data implementation to configure for the plugin. Possible values are hibernate5, hibernate7, mongodb.
Comment thread
jdaugherty marked this conversation as resolved.
- -h, --help: Displays the help message and exits.
- -i, --inplace: Creates a service within the current directory.
- --jdk=<javaVersion>: Specifies the JDK version the project should target.
Expand Down Expand Up @@ -106,10 +106,10 @@ This command will create a Grails plugin project named "minimal-plugin" with the
+
[source,shell]
----
grails create-plugin mongodb-plugin --gorm=mongodb
grails create-plugin mongodb-plugin --data=mongodb
----
+
This command will generate a Grails plugin project named "mongodb-plugin" configured to use MongoDB as the GORM implementation.
This command will generate a Grails plugin project named "mongodb-plugin" configured to use MongoDB as the Grails Data implementation.

3. Create a plugin with embedded H2 database and view support:

Expand All @@ -121,4 +121,4 @@ grails create-plugin h2-views-plugin --features h2,views-markup
+
This command will create a Grails plugin project named "h2-views-plugin" with the H2 database and views markup feature enabled, making it useful for projects that require an embedded database and view rendering capabilities.

These additional examples showcase different use cases for the `create-plugin` command, such as creating minimal plugins, customizing GORM implementations, and enabling specific features to meet project requirements.
These additional examples showcase different use cases for the `create-plugin` command, such as creating minimal plugins, customizing Grails Data implementations, and enabling specific features to meet project requirements.
4 changes: 2 additions & 2 deletions grails-doc/src/en/ref/Command Line/create-restapi.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ The `create-restapi` command accepts the following options:

- `NAME`: The desired name for the REST API application.

- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include. Available options include h2, scaffolding, gorm-hibernate5, spring-boot-starter-jetty, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipeline-grails, views-json, gorm-neo4j, asciidoctor, grails-web-console, logbackGroovy, mongo-sync, shade, geb, properties.
- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include. Available options include h2, scaffolding, gorm-hibernate5, gorm-hibernate7, spring-boot-starter-jetty, spring-boot-starter-tomcat, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, asset-pipeline-grails, views-json, gorm-neo4j, asciidoctor, grails-web-console, logbackGroovy, mongo-sync, shade, geb, properties.

- `-g, --gorm=GORM Implementation`: Specifies the GORM Implementation to configure, with options like hibernate, mongodb, neo4j.
- `-d, --data=Grails Data Implementation` (`-g`, `--gorm` are legacy aliases): Specifies the Grails Data implementation to configure, with options hibernate5, hibernate7, mongodb.

- `-h, --help`: Displays the help message and exits.

Expand Down
4 changes: 2 additions & 2 deletions grails-doc/src/en/ref/Command Line/create-web-plugin.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ grails create-web-plugin [OPTIONS] NAME

Here are the available options for the `create-web-plugin` command:

- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, spring-boot-starter-jetty, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, grails-web-console, logbackGroovy, mongo-sync, shade, properties.
- `-f, --features=FEATURE[,FEATURE...]`: Specifies the features to include in the plugin. Available options include h2, gorm-hibernate5, gorm-hibernate7, spring-boot-starter-jetty, micronaut-http-client, cache-ehcache, hibernate-validator, postgres, mysql, cache, database-migration, grails-gsp, hamcrest, gorm-mongodb, assertj, mockito, spring-boot-starter-undertow, github-workflow-java-ci, jrebel, testcontainers, sqlserver, grails-console, views-markup, views-json, gorm-neo4j, asciidoctor, grails-web-console, logbackGroovy, mongo-sync, shade, properties.

- `-g, --gorm=GORM Implementation`: Specifies the GORM Implementation to configure for the plugin. Possible values are hibernate, mongodb, neo4j.
- `-d, --data=Grails Data Implementation` (`-g`, `--gorm` are legacy aliases): Specifies the Grails Data implementation to configure for the plugin. Possible values are hibernate5, hibernate7, mongodb.

- `-h, --help`: Displays the help message and exits.

Expand Down
Loading
Loading