Repository navigation
Description
This issue is the Community over Code Glasgow 2026 working document for one Grails application generator and one agreed CLI command structure. It inventories how the two generators and the several CLIs actually work today. It does not prescribe combining them, deprecating one, or mixing them.
The three issues already linked from the hackathon page cover slices of this:
- Unify and Simplify CLI Command Architecture #15301 — unify CLI command architecture
- Make profiles optional for the Grails-Shell CLI #14081 — make profiles optional for grails-shell-cli
- Forge vs Profile dependencies for plugin and web-plugin #14944 — Forge vs profile dependency drift for
plugin/web-plugin
Those remain useful. This issue is the map of the whole intersection so a plan (and any code) can be discussed against a shared picture of what exists.
Why there are two generators
Grails currently has two independent application generators that produce overlapping, but not identical, projects:
| Generator | Entry points | Technology | Lives in |
|---|---|---|---|
| Profiles | grails create-app (shell CLI default), create-plugin, create-web-plugin, create-profile |
YAML + Groovy skeletons, Eclipse Aether profile JARs, Ant copy/filter | grails-profiles/, consumed by grails-shell-cli/ |
| Forge | grails -t forge create-app, start.grails.org, latest.grails.org (and the other version slots), curl ZIP |
Micronaut Launch-style Java features + Rocker templates | grails-forge/ |
They are not merely two UIs over one engine. They do not share templates, they do not share a feature model, they do not share a command runtime, and they do not produce the same build.gradle. Forge-generated apps still declare a profile dependency so that the shell CLI can keep working after generation. Profiles still exist as published Maven artifacts (org.apache.grails.profiles:{web,plugin,…}) that both generators and the shell CLI consume for different reasons.
The grails binary users install is a third piece: DelegatingShellApplication in grails-forge/grails-cli, which dispatches to either Forge CLI or Shell CLI.
There is also a fourth command path after Grails 8: Gradle ApplicationCommand / companion -cli artifacts / the grailsCli configuration (see the user guide "CLI Commands Move to Companion -cli Artifacts"). That path is how dbm-*, generate-*, url-mappings-report, schema-export and similar commands are discovered at build time. It is neither a profile YAML command nor a Forge Picocli command.
Historical context
Grails 1–2: Gant scripts in the distribution
Before Grails 3, grails create-app and artefact commands were Gant scripts shipped inside the Grails distribution. There was one generator and one CLI. Plugins could add scripts. There were no profiles and no Forge.
Grails 3.0 (2015): Profiles + Shell CLI
Grails 3 rebuilt the CLI around profiles: versioned Maven JARs containing profile.yml, a project skeleton, optional features, YAML/Groovy commands, and artefact templates. This is documented as a deliberate break from earlier Grails CLIs (grails-doc still opens the command-line chapter with "Grails 3.0's command line system differs greatly from previous versions").
Profiles solved several Grails 3 problems at once:
- Application types as reusable, inheritable JARs (
web,rest-api,plugin, …) rather than one hard-coded skeleton. - Commands after creation (
create-controller,run-app,generate-all, …) living in the same JAR as the skeleton, resolved from the app'sprofiledependency. - Third-party / company profiles published to Maven, resolved with Eclipse Aether before Gradle exists (because
create-apphas no Gradle yet). - Gradle Tooling API for
run-app/test-app/compileso the CLI could drive the new Gradle build.
The profile compiler and publisher are Gradle plugins (org.apache.grails.gradle.grails-profile, GrailsProfilePublishGradlePlugin). The IntelliJ Grails plugin historically talked to this shell CLI.
CreateAppCommand is annotated @since 3.0. AbstractProfile is @since 3.1. create-profile arrived so organisations could mint their own profiles.
Grails 6 (circa 2022): Forge, from Micronaut Launch
Grails Forge is a fork/adaptation of Micronaut Launch (the Micronaut equivalent of Spring Initializr). Feature classes are @since 6.0.0. The architecture is:
- Java
Featurebeans, selected and validated, thenapply(GeneratorContext) - Rocker templates for generated files
- Picocli CLI (
grails-forge-cli) - HTTP API (
grails-forge-api+ Netty) servingstart.grails.org - Optional analytics
- A React UI in a separate repo (
apache/grails-forge-ui)
Forge was introduced as the modern generator: feature combinatorics, a website, curl, JDK/servlet/GORM options, preview/diff. The Micronaut origin is still visible: Language has only GROOVY, BuildTool has only GRADLE, TestFramework has only SPOCK, and Category still lists BPM, IoT, serverless, distributed tracing, service discovery, etc.
The "gradual transition" (Grails 6–7)
#14081 records the intent at the time: Forge is "the modern way to generate Grails applications"; profile generation via shell CLI "was brought back to support a more gradual transition"; "that other 90%" of the shell CLI (run, test, Gradle, interactive mode, IntelliJ, ApplicationCommands) "will continue to be important."
Profiles were then a "redundant burden" because they use "totally different technology" from Forge, and keeping skeletons/dependencies aligned is manual.
#14699 (closed, Grails 7.0.0-M5) was the work to make 7.0.x profiles generate valid Grails 7 apps that match Forge defaults "as much as possible." Drift did not stop there: #14933 and #14944 are still open for remaining dependency mismatches.
Apache monorepo (Grails 7)
grails-forge and grails-profiles used to be separate GitHub repositories. They now live in apache/grails-core (grails-forge/ is its own Gradle build; grails-profiles/ is part of the root build). The hackathon page still points at the old standalone repos; the code to work on is this monorepo.
Grails 8: more CLI surface, not less
Grails 8 added:
- Hibernate 7 as a Forge
--dataoption (gorm-hibernate7), while default GORM is still Hibernate 5 (GormImpl.DEFAULT_OPTION = HIBERNATE5) and profiles still default thehibernate5feature. - Companion
-cliartifacts andgrailsCliauto-provisioning so plugin commands are not on the runtime classpath. DelegatingShellApplicationstill defaultsGRAILS_PREFERRED_SHELLtoshell, notforge.
The user guide currently documents both CLIs in the same chapter, sometimes contradicting itself about which create-app is preferred.
Current topology (what a user actually runs)
grails (SDKMAN / distro / project wrapper)
└── grails-cli DelegatingShellApplication
├── GRAILS_PREFERRED_SHELL=shell|forge (default: shell)
└── first args -t/--type shell|forge
├── forge → org.grails.forge.cli.Application (Picocli, Micronaut DI)
└── shell → org.grails.cli.GrailsCli (JLine, profiles, Gradle Tooling API)
Quirks of the dispatcher:
- Forge Picocli commands are Micronaut beans and "can't be nested", so the wrapper cannot expose a single Picocli tree with autocomplete across both CLIs (comment on
DelegatingShellApplication). -t/--typeis consumed by the wrapper and stripped before the chosen CLI sees the rest. Forge's own-tis--test(test framework). Shell does not use-t. This is easy to confuse.- Default with no
-tis shell, even though parts of the user guide call Forge "the preferred method for initiating new Grails projects." - Inside a generated app,
./grailsis the wrapper again. Docs tell you to generate with Forge then switch to shell for run/test/deploy.
Three published-ish CLIs therefore exist in source:
| Artifact / module | Class | Role |
|---|---|---|
grails-cli (shadow) |
DelegatingShellApplication |
User-facing grails binary |
grails-forge-cli |
org.grails.forge.cli.Application |
Generation + limited codegen |
grails-shell-cli |
org.grails.cli.GrailsCli |
Generation via profiles + project lifecycle + profile commands + ApplicationCommands |
How Profiles generate an application
Profile artifacts
Published as org.apache.grails.profiles:<name> JARs. Layout inside the JAR (META-INF/grails-profile/):
profile.yml
commands/ # YAML and/or Groovy CLI commands
features/<name>/ # feature.yml + optional skeleton
skeleton/ # files copied into the new project
templates/ # artefact templates for create-*/generate-*
Compiled by GrailsProfileGradlePlugin / ProfileCompilerTask.
Inheritance tree (current monorepo)
base
├── web
│ └── web-plugin (also extends plugin)
├── plugin
│ └── web-plugin
│ └── rest-api-plugin (also extends rest-api)
├── rest-api
│ └── rest-api-plugin
└── (profile) # meta-profile for creating new profiles; does not extend base in profile.yml
Inheritance is Gradle profileRuntimeApi, not profile.yml extends: (that key exists in AbstractProfile but the shipping profiles use Gradle). Order of profileRuntimeApi declarations controls skeleton copy order and command override order.
web-plugin additionally sets build.merge: [base, web, plugin] so parent build.gradle fragments are concatenated rather than first-wins.
profile.yml schema (what it can express)
Documented in grails-doc / profileStructure.adoc, implemented in AbstractProfile + CreateAppCommand:
description,instructions(printed after create)repositories,build.repositories,build.plugins,build.excludesdependencies(scope + coords + optional transitive excludes;excludesscope strips parent deps)features.defaults,features.requiredskeleton.excludes,skeleton.parent.target(multi-project),skeleton.binaryExtensions,skeleton.executable(Ant patterns, chmod)command.excludescommandsmap (class name → groovy/yml) — used less than directory-scanned commands
Generation algorithm (CreateAppCommand.handle)
- Resolve profile name (
--profileor default:web/plugin/web-plugin/profiledepending on command). - Resolve the profile JAR via MavenProfileRepository + Eclipse Aether (not Gradle). Repos from
~/.grails/settings.groovygrails.profiles.repositories, plus~/.m2/settings.xmlfor proxies/auth. SNAPSHOT Grails versions add ASF snapshot and Sitemesh snapshot repos into the generated build. - Evaluate features: requested
--features∩ profile features, plus required features. If none requested, defaults + required. Unknown feature names warn with a 2-character prefix "possible solutions" heuristic; they do not fail the command. - Parse app name:
com.example.myapp→ groupcom.example, appmyapp; baremyapp→ synthesized package from hyphenated tokens.--inplaceuses the current directory name. - Refuse non-empty target directories.
- For each profile in the inheritance chain, unzip if needed, copy
skeleton/with Ant:- Token filter on file contents and paths (
@grails.codegen.defaultPackage.path@, etc.). - Binary extensions skipped by the text filter.
application.ymldocuments concatenated with---separators (not a deep YAML merge).build.gradle/gradle.propertiesconcatenated when merge is enabled.
- Token filter on file contents and paths (
- Copy each selected feature's
skeleton/the same way; append featureapplication.yml/build.gradle/gradle.properties. replaceBuildTokens: inject@dependencies@,@buildPlugins@,@repositories@,@buildDependencies@,@buildRepositories@, plus the variable map. Always addprofile "org.apache.grails.profiles:<name>"as a Gradleprofilescope dependency.- chmod executable patterns (
gradlew*,grailsw*). - Print instructions if any.
Skeleton tokens (undocumented in the user guide — #11496)
Set in CreateAppCommand.initializeVariables:
| Token | Meaning |
|---|---|
@grails.codegen.defaultPackage@ |
Java package |
@grails.codegen.defaultPackage.path@ |
package as path |
@grails.codegen.projectClassName@ |
e.g. Myapp |
@grails.codegen.projectNaturalName@ |
e.g. Myapp natural |
@grails.codegen.projectName@ |
script name |
@grails.profile@ |
profile name |
@grails.version@ |
Grails version |
@grails.app.name@ / @grails.app.group@ |
app / group |
@APPNAME@ |
raw app name |
@gorm.version@, @groovy.version@, @grails-gradle-plugins.version@ |
from profile dependency versions when using MavenProfileRepository |
Command templates later use @artifact.package.path@, @artifact.name@, @artifact.propertyName@.
Shipping profiles and their features
| Profile | Default features | Required features | Notable extras |
|---|---|---|---|
| base | events |
— | Gradle app plugin, BOM, logging, validation, boot starter, grails-core, Spock, datamapping test support, devtools. Not created directly. |
| web | hibernate5, geb2 |
gsp, asset-pipeline |
WAR, grails-web, actuator, Tomcat, GSP-related modules, sitemesh3, scaffolding, Geb testFixtures, Bootstrap/jQuery webjars |
| plugin | — | — | grails-plugin Gradle plugin, grails-core only. Features: maven-publish, asset-pipeline-plugin |
| web-plugin | asset-pipeline-plugin |
gsp |
Merges base+web+plugin; excludes WAR and grails-web plugin; excludes many skeleton files (assets, i18n, spring, UrlMappings, BootStrap); excludes war command |
| rest-api | hibernate5 |
json-views |
WAR, grails-web, JSON views testing support. Feature: security (Spring Security REST, pinned 7.0.0-SNAPSHOT) |
| rest-api-plugin | hibernate5 |
json-views |
grails-plugin plugin; extra modules (codecs, async, datasource); Micronaut HTTP client on tests; excludes controllers/views/i18n skeleton |
| profile | — | — | Skeleton for authoring a new profile; commands: create-command, create-creator-command, create-generator-command, create-feature, create-gradle-command, create-template, install |
Base profile optional features (inherited by children): hibernate5, mongodb, rx-mongodb, neo4j, gsp, json-views, markup-views, asset-pipeline, less-asset-pipeline, geb2, events.
Profile feature quirks
geb2:feature.ymlhas emptydependencies/plugins. Geb comes from the web profile'sintegrationTestImplementation testFixtures("org.apache.grails:grails-geb"), not from the feature. The name is historical (Geb 2).hibernate5: still the default GORM for web/rest-api/rest-api-plugin. Adds H2 + HikariCP. Nohibernate7profile feature exists.rx-mongodb: coordinatesorg.grails.plugins:rx-mongodbandorg.apache.grails.async:grails-async-rxjava— pre-Apache / possibly stale.neo4j:org.grails.plugins:neo4j— same vintage.json-views: also pullsgrails-data-mongodb-gson-templateseven for Hibernate apps (views-json-templates dependency may not be needed by default with the views-json feature #14868 is the Forge-side cousin of this).securityon rest-api: hard-pinsgrails-spring-security-rest:7.0.0-SNAPSHOT.- Features are not exclusive. Profiles have no equivalent of Forge's
OneOfFeature/ servlet/GORM enums. Selectingmongodbdoes not clearly turn offhibernate5unless the user omits the default by passing an explicit--featureslist (which replaces defaults, then re-adds required). - Passing
--featuresdrops unspecified defaults.grails create-app x --features mongodbdoes not keephibernate5/geb2unless also listed; requiredgsp/asset-pipelinestill apply.
Profile commands (the "other 90%")
Profiles are not only a generator. After create-app, grails-shell-cli loads commands from:
- Hard-coded
ServiceLoadercommands (META-INF/services/org.grails.cli.profile.Command):create-app,create-plugin,create-web-plugin,create-profile,open,help,list-profiles,profile-info, Gradle command, RunCommand. CommandFactoryimplementations: YAML files, Groovy scripts, ServiceLoader commands, ApplicationContextCommandFactory (adapts GradleApplicationCommands /-cliartifacts to the shell).- The resolved profile JAR (and parents):
commands/*.ymlandcommands/*.groovy. - The application itself:
src/main/scripts/*.groovy.
YAML steps: render, mkdir, execute, gradle.
Groovy scripts extend GroovyScriptCommand (templates, flags, completers, synonyms).
base commands include lifecycle that invoke Gradle via the Tooling API: run-app, stop-app, test-app, compile, clean, assemble, package, console, shell, stats, dependency-report, list-plugins, plugin-info, bug-report, run-script, run-command, add-property, plus artefact create-domain-class, create-unit-test, create-script, create-command.
web adds create-controller, create-service, create-taglib, create-interceptor, create-integration-test.
rest-api adds REST variants (create-restful-controller, create-domain-resource, create-functional-test) and Groovy generate-all / generate-controller / generate-views / generate-unit-test / generate-functional-test.
plugin adds publish-plugin, package-plugin, install.
profile (the meta-profile) is a generator for generators.
Interactive JLine shell, completers (including domain-class completers), --non-interactive, and list-profiles / profile-info (only outside a project — documented) are all shell/profile concerns.
list-profiles / profile-info / custom profile GAV (--profile=com.mycompany.grails.profiles:myprofile:1.0.0) and ~/.grails/settings.groovy groupId/version defaults have no Forge equivalent.
How Forge generates an application
Modules
| Module | Role |
|---|---|
grails-forge-core |
Features, options, ProjectGenerator, Rocker templates, Gradle model |
grails-forge-cli |
Picocli commands, interactive shell, codegen |
grails-forge-api |
HTTP: create ZIP, preview, diff, select-options, features, version |
grails-forge-web-netty |
Runnable API server |
grails-forge-analytics-postgres |
Optional analytics (not deployed on current AWS slots) |
grails-cli / grails-cli-shadow |
Delegating wrapper |
test-core |
Generation tests |
Application types
ApplicationType enum: WEB, REST_API, WEB_PLUGIN, PLUGIN. Default WEB.
No REST_API_PLUGIN. No PROFILE. Tracked as #14932 (blocked on #14944).
Each type has its own AvailableFeatures bean (WebAvailableFeatures, …) so the selectable set differs.
Generation algorithm (DefaultProjectGenerator + ContextFactory)
- Parse name (
NameUtils.parse) — package + app from dotted name;--inplaceuses current dir. - Build
Options(reloading, GORM, servlet, JDK, OS). Nulls become defaults: DevTools, Hibernate 5, Tomcat, JDK 21. - Resolve named features; unknown feature names fail (
IllegalArgumentException). - Apply every
DefaultFeaturewhoseshouldApply(type, options, selected)is true (always-on features:base,grails-profiles, Gradle, logback, yaml, grails-application, … plus type-specific ones). validatePreProcessing(e.g.OneOfFeaturegroups: one servlet, one GORM, one logging config, one primary security).processSelectedFeatures— features may add/exclude others (getDependentFeaturesis descriptive metadata for UIs).validatePostProcessing.- Write
grails-forge-cli.ymllisting the resolved feature names and options (legacygrails-cli.ymlstill read;profile:key marks v1 format and triggersupdate-cli-configwarning). applyeach feature: add Rocker/URL templates, Gradle deps/plugins, configuration keys, binary resources.- Render all templates through
TemplateRendererto filesystem or ZIP.
Forge is offline. It does not invoke Gradle, does not start the app, and does not resolve profile JARs at generation time. Versions come from bundled grails-versions.properties (see #14858: SNAPSHOT Forge still needs a rebuild to pick up BOM bumps).
Options (first-class, not features)
| Option | Values | Default | Profile equivalent |
|---|---|---|---|
--jdk / --java-version |
21, 25, 26 | 21 | none (wrapper/Gradle whatever the skeleton has) |
-s / --servlet |
tomcat, jetty, undertow, none | tomcat | web/rest-api hardcode Tomcat starter |
-d / --data (-g/--gorm legacy) |
hibernate5, hibernate7, mongodb (legacy hibernate → hibernate5). Enum also has neo4j |
hibernate5 | --features hibernate5|mongodb|neo4j |
-r / --reloading |
devtools, jrebel, none | devtools | base always adds spring-boot-devtools |
--list-features |
— | — | no equivalent (profile-info lists profile features) |
-f / --features |
comma list, additive on top of defaults | — | --features replaces defaults |
-i / --inplace |
current dir | — | same flag; Forge historically errored if NAME omitted (#14872) |
Docs still mention -t / --test with junit, spock. TestFramework enum currently has only SPOCK. User-guide feature lists are stale (still mention assertj, hamcrest, logbackGroovy, grails-gsp as a flag, embedded-mongodb, micronaut-inject-groovy).
Forge feature inventory (names)
Always-on / often invisible (DefaultFeature, many isVisible() == false):
base, gradle, gradle-settings-file, gradle-build-src, yaml, logback, logback-config (opt-in XML), grails-application, grails-dependencies, grails-gradle-plugin, grails-url-mappings, grails-web, grails-profiles, grails-wrapper, app-name, readme, spring-boot-autoconfigure, spring-boot-starter, spring-resources, spock, grails-gorm-testing-support, …
GORM / data: gorm-hibernate5, gorm-hibernate7, gorm-mongodb, gorm-neo4j, gorm-async, gorm-graphql, h2, mysql, postgres, sqlserver, mongo-sync, testcontainers, mongodb-testing-support, database-migration, hibernate-validator.
Views: gsp (docs sometimes say grails-gsp), grails-layout, sitemesh3, scaffolding, views-json, views-markup, views-json-testing-support.
Servlet: spring-boot-starter-tomcat, spring-boot-starter-jetty, grails-undertow.
Security: grails-spring-security, grails-spring-security-ui, spring-boot-starter-security.
Reloading: spring-boot-devtools, jrebel.
Other selectable: asset-pipeline-grails, cache, cache-ehcache, asciidoctor, github-workflow-java-ci, micronaut-http-client, grails-micronaut, grails-quartz, grails-web-console, shade, properties, mockito, geb-with-testcontainers, geb-with-webdriver-binaries, spring-boot-virtual-threads.
Hibernate 7 is not just a dependency swap: GrailsBase switches the BOM to grails-hibernate7-bom or grails-hibernate7-micronaut-bom so Hibernate 7 and the default Hibernate 5 BOM do not fight (user guide; issue #15942). Profiles cannot do this — they always emit grails-bom.
The hidden grails-profiles feature
GrailsProfiles is a DefaultFeature with shouldApply = true, isVisible = false. Every Forge app:
- sets
grails.profileto the application type with underscores turned into hyphens (web_plugin→web-plugin) - sets
grails.codegen.defaultPackage - adds
profile "org.apache.grails.profiles:<type>"
So Forge generation still requires published profile JARs at app runtime if the user wants shell-CLI profile commands. Forge did not replace profiles as a runtime command pack; it replaced them as a skeleton engine and still emits the old contract.
There is no Forge application type for rest-api-plugin, so that profile JAR is never selected by this feature.
Forge CLI commands
Create (always registered):
create-app, create-webapp (alias of web), create-restapi, create-plugin, create-web-plugin.
Codegen (registered only if grails-forge-cli.yml / legacy grails-cli.yml is present):
create-controller, create-service, create-domain-class, create-taglib, create-interceptor, create-job (Quartz; applies() gated).
These are Rocker templates, not profile YAML. They do not create the extra files some profile commands do (e.g. web create-controller also mkdirs grails-app/views/<name>). They do not include rest-api generate-all / create-restful-controller / create-functional-test. They do not invoke Gradle.
Forge interactive mode is its own Picocli loop (InteractiveShell), not JLine profile completion.
Forge HTTP / website
- UI:
https://start.grails.org(React,apache/grails-forge-ui) - API slots on AWS Elastic Beanstalk:
latest,snapshot,next,next-snapshot,prev,prev-snapshot,older— seven Forge versions behind one ALB GET /{name}.zip(and typed variants) for curl- Preview and diff endpoints
- OpenAPI / Swagger / RapiDoc
- GitHub create/OAuth exists in the codebase but is not deployed (README)
- Analytics module exists but is not deployed
Profiles have no website, no preview, no diff, no curl ZIP, no version slots.
The third command path: Gradle ApplicationCommand / -cli artifacts
Independent of both generators:
- Plugins publish a companion
*-cliJAR (Grails-Cli-Artifactmanifest,META-INF/grails-cli.factories). - The Grails Gradle plugin puts those on
grailsCli(notruntimeClasspath). - Shell CLI's
ApplicationContextCommandFactoryadapts them intograils <command>via Gradle Tooling API. - Gradle also exposes tasks directly (
dbmUpdate,urlMappingsReport, …).
Grails 8 moved this contract to org.apache.grails.core.cli.*. Legacy grails.dev.commands.* can still be bridged with legacyCommandSupport.
This is why "one CLI" is a larger question than "Forge vs profiles": even if generation is unified, lifecycle and plugin commands currently span shell CLI, Gradle tasks, and -cli artifacts. Forge CLI does not participate in this path at all.
Compare and contrast
Surfaces
| Capability | Profiles + Shell | Forge |
|---|---|---|
| CLI create | yes (default grails create-app) |
yes (grails -t forge …) |
| Website | no | start.grails.org |
| HTTP / curl ZIP | no | yes, versioned slots |
| Preview / diff | no | yes |
| Custom third-party generators | yes (publish a profile JAR) | no (features are code in grails-forge-core) |
create-profile meta-generator |
yes | no |
| Interactive JLine + completers | yes | Picocli interactive create/codegen only |
Drive Gradle (run-app, test-app, …) |
yes | no |
| IntelliJ Grails plugin | historically shell | no |
SDKMAN grails binary |
wrapper → both | wrapper → both |
Application types
| Type | Profile | Forge ApplicationType |
|---|---|---|
| web | yes (default) | WEB |
| rest-api | yes | REST_API |
| plugin | yes | PLUGIN |
| web-plugin | yes | WEB_PLUGIN |
| rest-api-plugin | yes | missing (#14932) |
| profile (author a profile) | yes | missing (intentional per #14932 text) |
| base | exists, not user-facing | hidden base feature, different meaning |
Feature model
| Profiles | Forge | |
|---|---|---|
| Definition | feature.yml + skeleton files |
Java Feature class + Rocker/URL templates |
| Combinatorics | defaults + required; --features replaces defaults |
defaults always applied; --features additive; OneOfFeature validators |
| Unknown name | warn, continue | fail |
| Exclusive groups | no | yes (GORM, servlet, logging, primary security) |
| JDK | no | 21/25/26 |
| Servlet choice | Tomcat hardcoded in web/rest-api | tomcat/jetty/undertow/none |
| Hibernate 7 + matching BOM | no | yes |
| Micronaut BOM switch | no | grails-micronaut / hibernate7-micronaut BOM |
| GitHub Actions workflow | no | github-workflow-java-ci |
| Database drivers (mysql/postgres/sqlserver) | no first-class (manual deps) | features |
| Testcontainers / Geb variants | geb2 (mostly empty) |
geb-with-testcontainers, geb-with-webdriver-binaries, testcontainers |
| Spring Security | rest-api security feature (REST, SNAPSHOT pin); no web-app equivalent |
grails-spring-security, UI, Boot starter |
| Quartz | no | grails-quartz + create-job |
| Cache / Asciidoctor / shade / properties | no / no / no / no | yes |
| Company-specific feature without a Forge PR | yes (own profile) | no |
Generated build / config drift (known)
#14944 / #14933 document concrete coordinate differences. Examples:
- Forge plugins include Hibernate, H2, Hikari, i18n, interceptors, url-mappings, web-boot, … that the plugin profile does not.
- Forge web-plugin adds
grails-layout, H2, Hikari, jansi that the web-plugin profile may not. - rest-api profile includes
grails-async; Forge rest-api may not (Update Profile Dependencies to more closely match Grails Forge Defaults #14933). - Forge always emits
profile "org.apache.grails.profiles:<type>"even though it did not use that profile to generate files. - Profiles concatenate
application.ymldocuments; Forge builds a single config model then writes YAML (or properties). - Token/
@dependencies@skeletons vs fully generated Gradle from a Java model — whitespace, plugin application style,platformvsenforcedPlatform,buildSrcvs buildscript classpath all differ. - Forge can emit
grails-hibernate7-bom; profiles cannot.
Post-create artefact commands
| Command | Shell / profile | Forge codegen |
|---|---|---|
| create-controller | YAML, + empty views dir (web) | Rocker, controller + spec only |
| create-service | YAML | Rocker |
| create-domain-class | YAML (base) | Rocker |
| create-taglib | YAML (web) | Rocker |
| create-interceptor | YAML | Rocker |
| create-unit-test / integration-test / functional-test | YAML | no |
| create-restful-controller / create-domain-resource | rest-api YAML | no |
| generate-all / generate-controller / generate-views | rest-api Groovy | no (Gradle scaffolding -cli is a separate path) |
| create-job | no | yes if quartz feature |
| create-script / create-command | base | no |
| add-property | Groovy | Forge has AddPropertyCommand |
| run-app / test-app / console / stats / … | yes | no |
Same command names therefore do different things depending on -t forge vs default shell, and depending on whether you are inside a project.
Documentation quirks
commandLine.adoc is two eras concatenated: Grails 3 profile lookup (PROJECT_HOME/src/main/scripts, profile commands/) then "The Grails Forge New Command-Line Interface". creatingAnApplication.adoc shows both CLIs. creatingProject.adoc lists Forge flags whose values are out of date. Profile guide still shows org.grails.grails-core plugin ids and hibernate feature names. Hackathon getting-started still clones standalone grails-forge / grails-profiles repos.
Other open issues that are slices of this
- Unify and Simplify CLI Command Architecture #15301 — CLI command architecture spread across libraries (
design-required; comments already ask whether to enhance Forge vs keep shell). Milestone 9.0.0-M1. - Make profiles optional for the Grails-Shell CLI #14081 — make profiles optional for shell; migrate Groovy script commands into shell; share a template engine. No milestone.
- Forge vs Profile dependencies for plugin and web-plugin #14944 — plugin / web-plugin coordinate mismatch. Milestone 7.0.8.
- Update Profile Dependencies to more closely match Grails Forge Defaults #14933 — closer default-dependency match. Milestone 7.0.8.
- Add Rest API Plugin application type to grails-forge #14932 — add rest-api-plugin to Forge (after Forge vs Profile dependencies for plugin and web-plugin #14944). Milestone 9.0.0-M1.
- Command line option --inplace does not work #14872 — Forge
--inplacewithout NAME. - For SNAPSHOTs of grails-forge: updates to grails-bom still requires a new build and deploy to update versions in grails-versions.properties #14858 — SNAPSHOT Forge vs BOM updates.
- views-json-templates dependency may not be needed by default with the views-json feature #14868 —
views-jsonpulling gson-templates. - Create Tests for views-markup feature #14852 — tests for
views-markup. - Profile Replaceable Tokens Should Be Documented #11496 — document profile replaceable tokens.
- Custom profiles: order of repositories #9830 — custom profile repository order (2017).
Closed but useful history: #14699 (make 7.x profiles generate valid apps).
Open questions (for the hackathon — not proposals)
These are the decisions the event asked for a plan on. Listing them is not choosing an answer.
Generator
- Is the long-term generator the Forge feature/Rocker engine, the profile skeleton/YAML engine, a shared template store both call, or something else?
- If one engine remains, what happens to the other's unique types (
rest-api-plugin,create-profile, third-party published profiles)? - Forge apps still depend on profile JARs for shell commands. Is that a bridge to remove, a permanent split (generate with A, command-pack with B), or the wrong layering?
- How should Hibernate 7 / Micronaut BOM switching work if profiles remain a generator?
- How should exclusive options (servlet, GORM, JDK) work if profiles remain a generator?
- What is the compatibility story for existing
~/.grails/settings.groovyprofile repos and in-house company profiles?
CLI binary and command structure
- What is the user-facing command set of
grailsgoing forward? One tree, or generate-with-Forge / operate-with-shell forever? - What should the default be when
GRAILS_PREFERRED_SHELLis unset? Docs and code disagree today. -tis wrapper-type vs Forge--test. What should flags mean?- Which artefact commands belong in the CLI vs Gradle vs
-cliartifacts?create-controllerexists in both CLIs and is not the same implementation. - Where do
run-app, interactive mode, and IntelliJ integration live if shell is no longer the generator? - Can Picocli (Forge) and JLine/profile commands (shell) share completion and help, given the Micronaut-bean nesting constraint on the wrapper?
- What is the story for
ApplicationCommand/ Grails 8-cliartifacts relative to profile YAML commands and Forge codegen?
Drift and maintenance
- While two generators exist, what is the source of truth for default dependencies? (Forge vs Profile dependencies for plugin and web-plugin #14944 / Update Profile Dependencies to more closely match Grails Forge Defaults #14933 are symptoms.)
- Is matching "as much as possible" (Update 7.0.x profiles to generate valid Grails 7 projects #14699) still the policy, or is divergence acceptable until a cutover?
- Which features on each side are load-bearing vs leftover (profile
rx-mongodb/geb2/ SNAPSHOT security pin; ForgeCategoryleftovers,Language/BuildTool/TestFrameworkenums)?
Docs and distribution
- One user-guide story for
create-app(the chapter currently tells both stories). - Website / curl / version slots if Forge is not the generator — or if it is the only generator, what happens to
list-profilesdocs. - SDKMAN contents, native images, and the project
./grailswrapper.
Pointers into the tree
- Dispatcher:
grails-forge/grails-cli/src/main/groovy/org/apache/grails/cli/DelegatingShellApplication.groovy - Shell generator:
grails-shell-cli/src/main/groovy/org/grails/cli/profile/commands/CreateAppCommand.groovy - Profile model:
grails-shell-cli/src/main/groovy/org/grails/cli/profile/AbstractProfile.groovy - Profile JARs:
grails-profiles/{base,web,plugin,web-plugin,rest-api,rest-api-plugin,profile}/ - Forge generator:
grails-forge/grails-forge-core/src/main/java/org/grails/forge/application/generator/DefaultProjectGenerator.java - Forge types:
…/application/ApplicationType.java - Forge still emitting profiles:
…/feature/grailsProfiles/GrailsProfiles.java - Forge CLI:
grails-forge/grails-forge-cli/src/main/java/org/grails/forge/cli/Application.java - User guide:
grails-doc/src/en/guide/commandLine.adoc,profiles.adoc,gettingStarted/creatingAnApplication.adoc
Hackathon context: Groovy & Grails at Community over Code Glasgow 2026.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsNo status
Activity
jdaugherty commentedon Oct 13, 2026
Contents
apache/grails-core #16348
One generator: Forge, feature packs, and a profile-free console
Base feat/forge-grails-composite (PR #16551, target 8.1.x) Verified 2026-10-13 PR state approved, conflicting with the 8.1.x tip Revision 10, 2026-10-13 (see change log)
This plan evaluates the proposal to make
grails-forge-clithe only application generator, let plugins extend generation without compiling code into Forge or running Gradle, remove profiles, and keepgrails-shell-clias the interactive console. File pointers are relative to the PR #16551 branch. Merging that PR, after resolving its conflict with the current8.1.xtip, is step zero.1. Verdict on the proposal
The direction is right. Profiles bought two things in Grails 3: a skeleton engine and an extensibility story, since anyone could publish a profile jar without a Grails pull request. Forge is now the better skeleton engine (exclusive options, Hibernate 7 BOM switching, preview and diff, a website, version slots) but has no extensibility story. Every feature is a compiled
@Componentingrails-forge-corefound by component scan, and the shipped CLI is one 48 MB shadow jar with no extension directory (grails-forge/grails-cli/build.gradle:117). A declarative, data-only feature format that plugins ship inside their jars restores what profiles offered without compiling anything into Forge and without Gradle at generation time.apache/grails-plugins-metadata: 256 reviewed plugin entries with coordinates, labels, docs and an indexer that already downloads each released jar to read its descriptor. Nothing in the framework reads it yet: today's shelllist-pluginscommand still scrapes an HTML directory listing of the legacyorg.grails.pluginsrepository (grails-profiles/base/commands/list-plugins.groovy:7), and Forge reads only its ownpom.xmlfor third-party versions. Both go away. The plan makes Forge readgrails-plugins-index.jsonfrom the repository'smainbranch and adds one artifact: a feature pack (per-plugin descriptor plus templates) that the indexer learns to detect.grails feature add, built on the existingFeatureDiffer(web-only today) and applied as a three-way patch with a dry run. Not a general rewriter. Theupdate-cli-configcommand the code tells users to run was never implemented (grails-forge-cli/.../CodeGenConfig.groovy:181); aproject migratecommand replaces it.create-appfrom grails-shell-cliDelegatingShellApplication),-t/--type, andGRAILS_PREFERRED_SHELL, which still defaults to the profile shell (:56).profileconfiguration with a defaultorg.apache.grails.profiles:webdependency (grails-gradle/plugins/.../GrailsGradlePlugin.groovy:461-490);grails.profileis injected as an active Spring profile at runtime (grails-core/.../GrailsApplicationPostProcessor.groovy:451); 109 in-repoapplication.ymlfiles set it; the BOM publishes profile constraints; the release verifier inspects the base profile jar (etc/bin/verify-jar-artifacts.sh:208-236). Nothing is removed in a minor release: the modules, shell code,profileGradle configuration and runtimegrails.profileinjection all go in 9.0.x together, withproject migrateand the upgrade guide carrying existing applications.help,gradleand pluginApplicationCommands, is dispatched through the resolved profile (grails-shell-cli/.../GrailsCli.groovy:385,AbstractProfile.groovy:461-499), and roughly 40 user-facing commands (run-app, test-app, clean, compile, war, console, every artefactcreate-*) are profile scripts. The console needs a profile-free command catalog and built-in lifecycle commands..grails/directory, gitignored.grails/, but commit the manifest (.grails/project.yml) and ignore only caches and run state.feature add, codegen gating, IDE detection and teammates' clones all need the manifest. Forge already renders a.gitignore(grails-forge-core/grails-app/views/forge/feature/build/gitignore.gsp), so the ignore rules are a template edit.2. Target architecture
Section 2 describes the end state. Section 5 says what can land in
8.1.x(additions, and replacements that function the same) and what waits for9.0.x(every removal).2.1 One
grailscommand treeForgeCommand, renamedgrails. Subcommands:create-app,create-restapi,create-plugin,create-web-plugin,create-rest-api-plugin(Add Rest API Plugin application type to grails-forge #14932),feature list|search|info|diff|add,plugin search|info(catalog aliases), the artefactcreate-*commands,project init|migrate, and the console commands (run-app,test-app,gradle,open,help, plugin commands). With no arguments inside a project it opens the interactive console; outside a project it prints help.InteractiveShellalready fixes its completion set at startup (grails-forge-cli/.../ForgeCli.groovy:103-106); that stays.DelegatingShellApplication.groovy, thegrails-shell-cliandgrails-forge-clistart scripts (grails-forge/grails-cli/build.gradle:166-192), and the-thandling (9.0.x; through 8.x they stay and the new tree sits beside them).grails-bomthrough Aether in a constructor even forgrails --helpoutside a project (grails-shell-cli/.../GrailsDependencyVersions.groovy:65-82) and resolves the project classpath through the Tooling API beforehelpinside one. Removing the Spring Boot CLI port (run,S/boot,S/compiler,S/archive, maven-resolver) and all profile resolution is the main speed win. The Forge CLI still boots a full Grails context per invocation (37 auto-configurations merged into the shadow jar); set a measured target such as 500 ms for--helpand track it with the init-script timing recipe used for Convert Grails Forge to Grails 9.0.x and fold it into the root build #16337.2.2 Generation engine: compiled features plus declarative feature packs
Forge keeps compiled
Featurebeans for framework-owned concerns: application types, build files, BOM switching (GrailsBase),OneOfFeaturegroups, options. It gains aDeclarativeFeatureadapter that turns a descriptor plus a template directory into aFeaturewhen the registry is built. Packs are loaded from three places:grails-forge-coreresources (official plugins migrate from compiled classes to packs wherever the feature is "dependencies plus config plus files");--feature-pack-dir) for authoring and testing a pack before publishing.Descriptor,
META-INF/grails-forge/feature.yml:Mapping onto what exists in
grails-forge-core:dependencies,platformsGeneratorContext.addDependencywithDependency.builder()scopes,.pom(true)for platforms (build/dependencies/Dependency.groovy:187-266,GradleDependency.groovy:102-122)excludesto the model. Declarative features run atFeaturePhase.DEFAULT; anything afterBUILDis silently dropped by the build-file snapshot (feature/build/gradle/Gradle.groovy:73).buildPluginsGradlePlugin.builder().id().version()build.propertiesgetBuildProperties().put(GeneratorContext.groovy:145)BUILDlike dependencies (Gradle.groovy:80).build.extensions,build.blocks,build.imports,build.settingsGradleBuild, replacing the singlerenderExtensions()slot (GradleBuild.groovy:122-134) andrenderSettingsExtensions()configurationgetConfiguration(),getConfiguration(env)(GeneratorContext.groovy:152-188)filesaddTemplatewithGspTemplateover a pack-scoped page locator, orBinaryTemplatefor verbatim files{packageName},{packagePath},{className},{naturalName},{propertyName},{name}(DefaultTemplateRenderer.groovy:44-62).readmeaddHelpTemplaterequires,conflicts,oneOfFeatureContext.addFeature, aFeatureValidator, a syntheticOneOfFeaturegroupartefactsForgeCli.CODE_GEN_COMMANDS,ForgeCli.groovy:45-57)Template language: GSP source, compiled by the CLI. External packs are a CLI-only capability; start.grails.org hosts the framework's own features and never renders a third-party pack (section 2.7). That removes the reason to keep pack templates logic-less, so packs use the same language as Forge's own 62 templates: GSP, with
<%@ page trimLogicLines="true" expressionCodec="none" %>and the same model (project,features,options). Bundled official packs are precompiled by the monorepo build as today. A third-party pack ships GSP source, and the CLI compiles it at generation time throughGroovyPagesTemplateEnginewith development mode on for the pack's directory (todayForgePagesforces it off,template/ForgePages.groovy:62-67), caching the compiled classes under~/.grails/forge/cache/<gav>/classes/<forge version>/. Source packs are tied to GSP syntax, not to a Groovy or GSP binary version, so one pack serves every Grails line its plugin supports. Files without a.gspsuffix are copied as bytes. A pack therefore runs the plugin author's code at generation time; that is the same trust the user already extends to the plugin's Gradle plugin and runtime, and the CLI says so when it fetches a pack.What this buys: converting an official compiled feature into a pack is a file move plus a descriptor, not a template rewrite; plugin authors write the template language they already know; and the
features.contains('gorm-mongodb')branches in today's templates carry over unchanged. What it costs: a few hundred milliseconds of Groovy compilation per template on first use; type errors in a statically compiled page (<%@ model %>) surface at generation time rather than at the author's build; and no static validation of a pack beyond its descriptor.Mustache (jmustache, logic-less, no code execution) stays the fallback if a logic-less format is ever needed, for example if the hosted service were ever to render community packs; the descriptor's
formatversion leaves room for atemplateEnginefield. An earlier revision of this plan recommended Mustache for exactly that hosted-safety reason; with the hosted service official-only, the trade favours GSP.Precedents. Quarkus extensions declare
metadata.codestartinquarkus-extension.yaml, ship the codestart in acodestartsclassifier jar (codestart.ymlplus Qute templates), and users select them withquarkus create app -x group:artifact:version. Spring Initializr keeps its dependency catalog declarative (initializr.dependencieswithcompatibilityRange,bom,repository) and reserves code (ProjectContributor,BuildCustomizer) for the service itself. Grails 3 profiles'feature.ymlplusskeleton/is the same shape as this proposal; it lived in the wrong engine.Conditional logic in packs. Forge features routinely add code depending on which other features are selected. On this branch 22 of the 118 feature classes and 10 of the 47 GSP templates branch on other features, in three patterns, and each has a declarative home. The rule: logic lives in the descriptor as data that Forge evaluates, and templates stay logic-less.
Auto-adding a collaborator (
processSelectedFeatures): Hibernate 7 adds H2 when no driver feature is selected (database/GrailsDataHibernate7.groovy:64), Geb adds Spock, Scaffolding adds GSP, Spring Security UI adds Spring Security. Most of the 22 classes do only this. It is the descriptor'srequireslist, evaluated during selection, before anything renders. The "add a default if nothing of this kind is present" variant needs a group form:Conditional contributions (
apply):TestContainersaddstestcontainers-spockonly when Spock is present andtestcontainers-mongodbonly when a Mongo feature is (database/TestContainers.groovy:81-87). That is awhenpredicate on a dependency, file or configuration entry, so the entry exists or does not; no template logic is involved:Branching inside a file: the security
user.gspemits acollection 'users'mapping for MongoDB and atable 'users'mapping for either Hibernate (feature/security/template/user.gsp:41-50). Pack templates are GSP, so this is written exactly as it is today, and selection finishes before rendering starts, so thefeatureslist a template sees is final:A descriptor may still name a condition once as a flag and reuse it in several files (
<% if (flags.sql) { %>), which keeps templates short, but nothing requires it:One predicate language serves
when,requiresandflags:feature,anyOf,allOf,not,applicationType, andoption(for exampleoption: { data: hibernate7 }). Predicates matter most for the parts a pack does not write as a template: the build file andapplication.ymlare generated by Forge from the dependency and configuration models, so a conditional dependency or configuration key has to be declared, not templated. The render model is the one today's GSPs use (projectwithname,className,propertyName,naturalName,packagePath;features;options) plus the pack'sflagsand anyparamsthe pack declares (the user and role class names of ans2-quickstart-style pack).Two things in the inventory stay compiled: features that take over a slot another feature owns (
GrailsBasechoosing the BOM, the Gradle plugin pickinggrails-webversusgrails-plugin,buildGradle.gspbranching per feature name) and features that reshape another feature's templates. A pack declaresconflictsandrequires; it does not rewrite someone else's output.How the template decision changed. Revisions 1 to 5 of this plan recommended Mustache, on the grounds that a pack had to be safe to render on start.grails.org. Once external packs became a CLI-only capability (section 2.7), the remaining arguments were weighed again:
grails-web-gspplus the servlet API into every plugin's build. Source packs compiled by the CLI avoid both.feature diffand--dry-runstill work, because rendering in memory is how Forge previews anyway.trimLogicLinespage directive that already exists for Forge's templates.Mustache, Handlebars or Pebble remain available later through a
templateEnginefield if a logic-less format is wanted for a hosted use. Framework-owned features keep their precompiled GSPs regardless.Build-file contributions.
build.gradleis the file every pack wants to touch, and it is where the current design is weakest. Three mechanisms coexist today: the model (dependencies, plugins, repositories, buildscript, properties); one generic slot,${gradleBuild.renderExtensions()}after the dependencies block (feature/build/gradle/templates/buildGradle.gsp:107), fed byGradlePlugin.extension(Writable); and eight branches hard-coded in the central template on feature names (gradle-build-src,asciidoctor,jrebel,spock,geb-with-local-browsers,grails-compile-static,gsp,asset-pipeline-grails,buildGradle.gsp:40-122) plus the BOM choice inbuildSrcBuildGradle.gsp:50-58. The hard-coded branches are the "everyone edits the central file" problem in miniature, and a pack cannot use them at all. There is also a silent bug:Dependency.Builder.extension(Writable)is accepted and then dropped (build/dependencies/Dependency.groovy:315,361-373), so thesourceSetsblockDatabaseMigrationPlugintries to add never reaches the build file (feature/migration/DatabaseMigrationPlugin.groovy:72).The rule for packs: no pack ships a
build.gradletemplate or a text patch. The build file stays generated from a model, and packs contribute through typed channels that Forge merges:dependencies,platformsdependencies {}Dependencyequality); the same coordinate with two explicit versions is an error naming both packsbuildPlugins(id,version,apply)plugins {}entry or anapply plugin:linebuild.repositories,build.buildscriptrepositories {},buildscript {}build.propertiesgradle.propertiesbuild.importsbuild.settingssettings.gradlefragments, for examplepluginManagementrepositoriesbuild.extensions.<name><name> { }block per key with the bodies concatenated;tasks.<task>keys rendertasks.named('<task>') { }build.blocksafterPlugins,afterDependencies,endsourceSets {}or a custom taskEvery fragment is a GSP with the pack's model, so it can branch on features. Ordering is deterministic: feature order, then feature name, then pack name. Today ties within a phase come from a
HashSetwalk (FeatureContext.groovy:90), so the same selection can render blocks in a different order between runs; the sort fixes that as a side effect.The framework's own features move to the same channels in phase 1: the asset-pipeline feature contributes
assets {}, compile-static contributesgrails {}, Spock and Geb contributetasks.test, asciidoctor and jrebel contribute their blocks, andGrailsBasecontributes the BOM. The central template then owns structure only. That is the proof that the channels are sufficient, and it is what makesfeature addtractable: the diff between the baseline build and the pack-applied build is a set of insertions inside existing blocks rather than a rewrite, which the three-way merge in section 2.6 applies cleanly as long as the user kept the block.Limits: a pack cannot change the BOM selection, reorder the framework's plugins, change the Java toolchain, or remove another feature's lines;
conflictsis the tool for incompatibility. The Gradle plugin's validation warns when abuild.blocksfragment could have been a typed channel, so free-form blocks stay rare.2.3 Plugin metadata: catalog plus pack
Where a pack lives, and the Gradle plugin that publishes it. Inside the plugin's main jar under
META-INF/grails-forge/. Authoring and publishing are automated by the Grails Gradle plugins, the same waygrails-plugin-cliautomates-clicompanions today: a plugin author keeps the pack insrc/main/forge/(feature.ymlplustemplates/), and thegrails-pluginGradle plugin, when that directory exists, does the rest:feature.ymlagainst the descriptor schema at build time (unknown keys, bad predicates, destination paths that escape the project, references to unknown feature names from the bundled index);.gspin the pack with the same GSP compiler Forge uses, as a check task, so type errors in a<%@ model %>page fail the author's build instead of a user'screate-app; the shipped artifact stays source;META-INF/grails-forge/of the runtime jar and stamps aGrails-Forge-Pack: <name>manifest attribute, which the indexer and the CLI can read without opening the whole jar;forgePackTesttask that generates a sample application for each supported application type with the pack applied, through forge-core in process, and runs./gradlew classeson it (opt-in, since it needs the local Maven publish chain the Forge tests already use);grails-publishapplied, needs nothing more: the pack travels with the plugin's existing publication.A
grails create-feature-packcommand scaffoldssrc/main/forge/in an existing plugin. The alternative layout, aforgeclassifier artifact as Quarkus uses, downloads less but adds a publication to sign and release; the fetcher prefers a-forge.jarclassifier when present and falls back to the main jar, so the Gradle plugin can switch to it later without changing the format.Catalog. The catalog already exists.
apache/grails-plugins-metadatais the data source of the plugin page: one YAML file per plugin atgrails-plugins/<group path>/<artifactId>.yml, submitted by pull request and reviewed by the Grails team.Every eight hours
index-plugins.groovyreads each plugin'smaven-metadata.xml, downloads every new version's jar by its exact URL, opensMETA-INF/grails-plugin.xmlinside it to readgrailsVersion, rewrites the YAML, and regeneratesgrails-plugins-index.json(a JSON array of those maps) through a pull request. The website'sPluginsTaskfetches that file at build time. As of 2026-10-13 the index has 256 entries (157 underorg.grails.plugins, 29 underorg.apache.grails, 12 underio.github.gpc, 9 undercloud.wondrify), 40 markeddeprecated, and 61 with at least one version whosegrailsVersionstarts with 7 or 8.The plan extends this pipeline instead of adding a second catalog:
META-INF/grails-forge/feature.ymland recordsforge: { name, applicationTypes }plus the jar'ssha256on that version entry. Same download, no extra cost. A plugin opts in by shipping the file; the YAML submission process does not change.grails-plugins-index.json:labelsmap to Forge categories through a small table,descanddocsfill description and documentation,deprecatedhides an entry fromfeature searchunless asked for, andversions[].grailsVersion(the7.0.0 > *range syntax from the plugin descriptor) filters candidates against the CLI's Grails version; the newest compatible non-snapshot version wins by default. The index for the matching release is bundled intograils-forge-coreas the offline fallback and refreshed straight from the repository:https://raw.githubusercontent.com/apache/grails-plugins-metadata/main/grails-plugins-index.json. Whatever is merged tomainis the current list; the indexer's pull requests land there every eight hours, so there is no separate publishing step and no mirror. The website already reads the same file, through the pre-ASFgrails/organisation path that GitHub redirects; switching it toapache/is a one-line fix.org.apache.grailsentries are already listed; the BOM stays the version authority for official coordinates inside generated builds, so those packs omit versions.grails create-app shop --features com.acme:acme-audit-grails:2.3.0. Users can add private indexes and repositories in~/.grails/forge.yml.Weaknesses of the index that the plan has to live with or fix:
grailsVersionis whatever the plugin descriptor says (grails-cache 8.0.0 reports8.0.0-SNAPSHOT > *),docsis missing on 134 entries,labelsare free-form, there is no checksum today, and the oldersync-latest-versionaction still refers to agrails-plugins.jsonfile that no longer exists.Fetching without a build. The indexer already shows the pattern:
createArtifactUrlbuilds the exact jar URL frommaven-repo,coordsand the version, and one zip entry is read from the download. The pack fetcher does the same with plain HTTPS GETs, no dependency graph: try<repo>/<group path>/<artifact>/<version>/<artifact>-<version>-forge.jar, then the main jar; read only theMETA-INF/grails-forge/**entries from the stream; cache under~/.grails/forge/cache/<group>/<artifact>/<version>/. Repositories: the entry'smaven-repo(honouring per-versioncoordsandmaven-repooverrides), then Maven Central, thenGRAILS_REPO_URL(the existing semicolon list, already validated byGrailsRepositoryOverrides), then~/.grails/forge.ymlentries with credentials. Snapshots readmaven-metadata.xmlfor the timestamped file. Proxies come from the JVM's proxy properties and~/.m2/settings.xml; a small dependency-free reader of that file avoids pulling Maven Resolver back into the CLI.--offlineand--refreshflags; the catalog cache has a 24-hour TTL.Security model. External packs exist only in the CLI. HTTPS only; sha256 verification against the index when it carries one; destination paths must be relative and must not escape the project (
.., absolute, symlinks); entry size and count caps on the zip; existing files are never overwritten atcreate-apptime; and because a GSP pack executes the plugin author's code at generation time, the CLI prints the pack's coordinates and checksum before first use, and--offlineserves only cached packs. The hosted Forge (start.grails.org) never loads a pack from outside its own build: it serves the framework's features, some of which may be implemented as bundled packs, and never fetches coordinates on request. This belongs inTHREAT_MODEL.md.2.4 Project state:
.grails/Why commit it:
feature addmust know the current feature set and options to compute a diff; artefact codegen is gated on it (today the gate isgrails-forge-cli.ymlin the current directory only, no parent walk,ForgeCli.groovy:115-128); IDEs can detect a Grails project and its type from it; CI can validate it. Precedents: Micronaut'smicronaut-cli.yml,.sdkmanrc,.mvn/. Everything else under.grails/is per-machine and goes into the generated.gitignore.Two keys stay in
application.ymlbecause runtime code reads them:grails.codegen.defaultPackage(grails-testing-support-web/.../WebSetupSpecInterceptor.groovy:111,grails-console/.../GrailsApplicationScriptRunner.groovy:69) and, through 8.x,grails.profile, becauseGrailsApplicationPostProcessoradds it as an active Spring profile with awebdefault; 9.0 removes that injection and Forge stops writing the key.grails project migratecreates.grails/project.ymlfor an existing app fromgrails-forge-cli.ymlor legacygrails-cli.yml(itsprofile:key maps to a type exactly asCodeGenConfigdoes today), or fromgrails.profileplus a scan ofbuild.gradlefor known coordinates, and removes theprofile "..."line from the build.2.5 The console after profiles
Command sources, in precedence order (first registration wins, as today):
grails-shell-cli/.../gradle/GradleUtil.groovy,GradleInvoker,GradleAsyncInvoker):run-app/stop-app(keep--https,--port,--debug-jvm, pid handling viaRunningApplicationProcess),test-app,compile,clean,assemble/war/package,console,shell,dependency-report,run-command,run-script,stats,bug-report.grails gradle <args>with completion fromReadGradleTasks(exists). Fix: arguments are passed as one string today (GradleCommand.groovy:62-65).ApplicationCommands from-clicompanions throughApplicationContextCommandFactoryandGradleTaskCommandAdapter(exists, profile-free apart from theProfileCommandinterface). Fix the two known gaps: legacy Grails 7 commands are listed but have no named Gradle task (GrailsCliGradlePlugin.groovy:411-414), so route them torunCommand; app-localgrails-app/commandsare invisible because onlygrailsCliClasspathjars are scanned (:450-480).create-unit-test,create-integration-test,create-functional-test,create-restful-controller,create-domain-resource,create-command,create-script, and pack-provided artefacts. Template lookup order:src/main/templates/<path>in the app, then the pack, then Forge's built-in GSPs. Extend scaffolding'sinstall-templatesidea so users can copy Forge's artefact templates intosrc/main/templates.src/main/scripts/*.groovyin the app,META-INF/commands/*in plugin jars, theGroovyScriptCommandDSL): unchanged in 8.x; in 9.0 the profile lookups go (methodMissingchaining throughprofile.hasCommand,GroovyScriptCommand.groovy:170-184, and the profile branch ofTemplateRendererImpl.groovy:241-266) and the scripts stay, deprecated, until the major after 9.0. Six in-repo commands exist only as scripts and need conversion toApplicationCommands or pack artefacts in 9.0: gebcreate-functional-test, quartzcreate-job,s2-create-acl-domains,s2ui-create-challenge-questions,s2ui-override, and dbmigration'sdbm-create-changelog/dbm-changelog-to-groovy, whose-clijar depends on grails-shell-cli fororg.grails.cli.profile.ExecutionContext(grails-data-hibernate7/dbmigration/build.gradle:87-92).rAforrun-app), "did you mean", and the legacy-command hint move fromAbstractProfile.groovy:361-499into a profile-freeCommandCatalog.Project detection walks up from the current directory to find
.grails/project.ymlorgrails-app(today: current directory only,GrailsCli.groovy:351-355).Command execution model. Commands already live outside profiles today, and three of the ways are code. Profiles are not what commands depend on; they are what the shell's dispatcher depends on.
commands/*.ymlor.groovysrc/main/scripts/*.groovyGrailsCli.groovy:385)META-INF/commands/*(fromsrc/main/scripts)ApplicationCommandin a plugin's-clicompanion (src/cli/groovy)JavaExectask per command, created byGrailsCliGradlePlugin; the shell wraps each one inGradleTaskCommandAdapterApplicationCommandin the app (grails-app/commands)./gradlew runCommand -Pargs=...only; no task, invisible to the shellgrails.dev.commands.ApplicationCommandwithlegacyCommandSupportrunCommandonly; the shell lists it but calls a task that does not existThe runtime half of this system is
grails-console, which the Gradle plugin auto-provisions intograilsClibecause every command task's main class comes from it.GrailsApplicationContextCommandRunner(per-command tasks andrunCommand) boots the application throughDevelopmentGrailsApplication, which swaps the context class toDevelopmentWebApplicationContext: aGenericWebApplicationContextover aMockServletContextpointed atsrc/main/webapp. The command gets the full context, plugins, GORM, data sources andBootStrap, unless it carriesskipBootstrap = true(theSkipBootstraptrait, currently copied into scaffolding and spring-security). No Tomcat, no port.GrailsApplicationScriptRunner(runScript),GrailsSwingConsole(console) andGrailsShell(shell) boot the same way with console-flavoured contexts; the profile commands namedconsoleandshellonly invoked those Gradle tasks.No command in the repository needs a running server: a search of every
src/clisource set finds nothing that starts one or makes HTTP calls.generate-open-apibuilds its model from beans (GrailsOpenApiGenerator,GroupedOpenApiContributor);dbm-*,schema-export,url-mappings-report,config-report,generate-*ands2-*all work on the context. The server-bound operations are lifecycle:run-appisbootRununder the Tooling API, asynchronous in interactive mode, with port polling, the pid file the application writes throughgrails.cli.pid.file, and--httpskeystore generation;stop-appreads that pid;test-apprunsintegrationTest, where the test JVM starts the server itself.After profiles, every command maps to exactly one of five execution modes:
grailsJVM, with the console services; Forge in process for codegencreate-*artefacts, pack artefacts,feature add,project migrate,sql-tailgradle <args>,compile,clean,assemble,warJavaExecplusGrailsApplicationContextCommandRunner, full context, mock servlet, no serverdbm-*,schema-export,url-mappings-report,generate-open-apirun-app,stop-app,test-appJavaExecintograils-consoleconsole,shell,run-scriptWhat follows from the table:
dbm-gorm-diffopens the GORM metamodel throughwithGormDatabase(applicationContext, dataSource)(grails-data-hibernate7/dbmigration/src/cli/.../DbmGormDiffCommand.groovy:50),schema-exportneeds theSessionFactory,url-mappings-reportneeds the mappings holder. All of them areApplicationCommands run byGrailsApplicationContextCommandRunnerwith the full context, and nothing in this plan changes that path; therequiresApplicationContextflag in the next item defaults totrue.ApplicationCommandalways pays a Gradle invocation plus a full boot, even for pure file generation (s2-quickstart,create-scaffold-*,install-templates;SkipBootstraponly skipsBootStrap.groovy). The answer is arequiresApplicationContext = falseflag on the contract, and a console services API injected into such commands that carries what the script DSL offers today: project configuration (navigateConfig),baseDirandbuildDir, console output with ANSI and terminal width, a cancellation listener, aGradleRunner(synchronous and asynchronous task invocation with cancellation, the existingGradleInvokerandGradleAsyncInvoker),ServerInteraction(wait for a port or a health endpoint) andRunningApplication(the pid and port files under.grails/run/,stop()). The console already builds the class loader and instantiates every command to list them (ApplicationContextCommandRegistry), so running one there costs nothing extra; Gradle runs the same command in a plainJavaExecwithout booting the application. App-localgrails-app/commandsbecome runnable from the console too.sql-tailis the reference case: onfeat/sql-tail-command(PR Add the query-tail command to find query-heavy pages #16631) it is a script ingrails-datamapping-core's-clijar that readsgrails.gorm.sqlTail.filefrom the project configuration, waits for the capture file the running application writes underbuild/, follows it until cancelled, and usesflag,grailsConsoleandaddCancelledListener. It converts one to one onto those services, and withGradleRunnerit could start the application itself (bootRunwith the capture property) instead of asking the user to.GradleRunner.runCommand('dbm-gorm-diff', args)(the existingrunCommandtask and runner) or is split into a console-side command and a context-bound one. There is no mode that boots the context inside the console JVM: the console runs against the project's classpath through a class loader, not a Spring context, and that stays so.GradleRunner.async('bootRun', ...), DevTools-aware, the same pid file as the Run button andstop-app), waits withServerInteraction, works over HTTP, and stops it. Such a command declaresrequiresConsole = true: no per-command Gradle task is registered for it, because a Gradle task that launches a second build of the same project is not something to offer. ArequiresServermode that bootsGrailsAppwith an embedded container inside the runner stays off the table.run-app --sql-tailexists on that branch only because the base profile'srun-app.groovywas edited to add the flag and pass-Dgrails.grails.gorm.sqlTail.enabled=truetobootRun(grails-profiles/base/commands/run-app.groovy:9,36-37; the doubled prefix is the Gradle plugin's forwarding rule forgrails.*system properties). A plugin cannot do that. The console's built-inrun-apptherefore accepts declared options: a-clicommand or a pack declaresrunAppOptions(name, description, the system or Gradle property to set),run-appregisters them, andhelpand completion show them. Pass-through-Dand-Parguments remain for the undeclared case.Housekeeping the inventory found: move
SkipBootstrapintograils-core-cli; route legacy commands torunCommand; list app-local commands; keep the Tooling API connection open across console commands instead of reconnecting per call (GradleUtil.groovy:54-76).IDE integration. The IntelliJ plugin is now
apache/grails-intellij-plugin(donated by JetBrains, imported fromintellij-obsolete-plugins), so its CLI coupling is work this plan schedules rather than a risk to confirm. What it does today, from the source:org.grails.cli.GrailsCli, classpath = theorg.apache.grails:grails-shell-cli:<grailsVersion>artifact resolved through a detached Gradle configuration by the plugin's own tooling model builder (libs/gradle-tooling/.../GrailsModuleModelBuilderImpl.java:54-78,plugin/.../runner/impl/Grails3GradleCommandExecutor.java:54), with--plain-outputappended. Thegrailslauncher andgrails-forge-cliare not involved.bug-report,clean,compile,console,create-*,dependency-report,generate-*,gradle,install,install-templates,list-plugins,plugin-info,run-app,schema-export,shell,stats,stop-app,test-app,url-mappings-report,war) inplugin/.../commands/Grails3CommandProvider.java:31-70.run-appthrough the same executor (runner/GrailsRunConfiguration.java:70), so the IDE's Run button depends on the base profile'srun-appscript and its pid file.grails-appdirectory (structure/GrailsApplicationManager.java:167).https://latest.grails.org:/select-options,/versions,/application-types/{type}/features,/create) infeature/forge/GrailsForgeModuleBuilder.kt:67-221.IMPROVEMENT-PLAN.mdsection 2.6 already intends to move the run configuration to GradlebootRun, rebuild the command layer from profile YAML plus forge-cli commands, and keep the wizard on the hosted API with an offline fallback viagrails-forge-cli. The profile half of that plan is superseded by this one.What changes on the Grails side so the plugin can follow:
--plain-outputand--non-interactivehonoured (the shell declares--non-interactivetoday and ignores it). Through 8.x the shell, its artifact andorg.grails.cli.GrailsClistay untouched, so the current plugin keeps working; 9.0 removes them, and the plugin release that supports the new entry point ships with 9.0.0. The plugin resolves the CLI artifact per project Grails version, so 8.x projects are unaffected by that release.grails help --json(name, description, synonyms, arguments, flags, completer kind, execution mode) replaces the hard-coded list, so plugin-clicommands, pack artefacts and app-local commands appear in the IDE without a plugin release. The same catalog feeds shell completion, so it is not IDE-only work..grails/project.ymlfirst (application type, default package, features), falling back tograils-app.bootRundirectly, as the plugin's own plan says, or the CLI'srun-appin non-interactive mode; either way the pid and port files move to.grails/run/.feature addare CLI operations the IDE can surface by invoking the same entry point, which is why they need no web API.Sequencing: the plugin release is lock-step with 9.0.0, which is why step 5 lists it.
2.6
feature addon an existing app.grails/project.yml.DiffControllerdoes throughFeatureDiffer.build.gradle,application.yml,settings.gradle,README.md) are applied as a three-way merge with context (java-diff-utils or JGit's apply); a hunk that does not apply is reported with the rejected text, and--dry-run/--diffprint the patch instead of applying it.project.yml.This is deliberately additive. Removing a feature prints the inverse diff only. The approach is simpler than parsing Gradle scripts and more useful than Micronaut's
feature-diff, which only prints the diff.feature diffalso becomes a CLI command; today the diff exists only as a web endpoint.2.7 Hosted Forge and the UI
feature addare CLI capabilities; the web API andapache/grails-forge-uigain no plugin search and load nothing from outside their build.FeatureDTOmay exposedocumentation, which today is only written into the README.3. What profiles offered and what replaces it
create-appwith profiles--profile g:a:v)kind: presetnaming a type, option defaults, a feature list and extra files;grails create-app --preset com.acme:acme-starter:1.0 shopcreate-profileand the seven profile-authoring commandsgrails create-feature-pack <name>scaffolds a pack skeleton laterlist-profiles,profile-info,list-plugins,plugin-infofeature list,feature info,plugin search,plugin info, backed bygrails-plugins-index.json--featuresreplaces defaults; unknown names warn--exclude-featuresso a default such as a Geb variant can be droppedrest-api-pluginapplication typeless-asset-pipeline,rx-mongodb, rest-apisecurity(grails-spring-security-rest:7.0.0-SNAPSHOT),maven-publishcreate-*with web and rest-api variants, test variantsgenerate-all/generate-viewsproducing gson views-cligenerate-*produce GSP only. Add gson scaffolding templates to grails-views-gson (src/main/templates/scaffolding/*.gson) and a--views gsonoption or a views-gson-clicommandsrc/main/templatesoverride of artefact templatesApplicationCommandis the path~/.grails/settings.groovyprofile repositories and defaults~/.grails/forge.ymlrepositories and catalogs; proxies from JVM properties andsettings.xmlinstructionsprofile.yml(unused in-repo)instructionsexecute/gradlecommand stepsApplicationCommandsgrails.profileindex.gsp:141-144info.app.*; the type lives inproject.yml, which the runtime does not readgrails.profileas an active Spring profilewebapache/grails-intellij-plugin)org.grails.cli.GrailsClifrom a resolvedgrails-shell-clijar; hard-coded list of 34 shell commands;run-apprun configuration through the same path; new-project wizard on the hosted Forge API.grails/project.ymldetection,bootRunrun configuration, wizard unchanged for official featuresprofileGradle configuration in existing buildsproject migratedeletes the line and a declaredprofiledependency fails configuration with a pointer to the upgrade guide4. Removal inventory
Grouped by area; each item is a known dependency on profiles or the dispatcher.
Forge (
grails-forge/):feature/grailsProfiles/GrailsProfiles.groovy(replace with aProjectManifestfeature that writes.grails/project.ymlandgrails.codegen.defaultPackage);Scope.PROFILE,Phase.PROFILE,GradleConfiguration.PROFILE;CodeGenConfiglegacyprofile:handling (moves toproject migrate); the drift specGrailsGspSpec.groovy:326-350, which asserts byte identity withgrails-profiles/webskeleton files;GrailsProfilesSpec;grails-forge-web/grails-app/conf/application.yml:18; stale comments ingrails-cli/build.gradle:70andgrails-cli-shadow/build.gradle:50; the.gitignoreDirectoryScanner workaround ingrails-forge/settings.gradle:88-93.Shell (
grails-shell-cli/): everything underprofile/repository/,Profile,AbstractProfile,ResourceProfile,FileSystemProfile,Feature,DefaultFeature,ProfileRepository*,ProfileRepoConfig,ProfileUtil, theCreate*Command,ListProfilesCommand,ProfileInfoCommand,ArgumentCompletingCommand,io/GradleDependency, their service-file entries,GrailsClimembers:87-89,129-133,195-201,260-271,307-311,324-332,386-394,518-534; the Spring Boot CLI port and the maven-resolver dependencies (grails-shell-cli/build.gradle:86-100). Re-homeCompilerAutoConfiguration, which the hibernate boot-plugins compile against (grails-data-hibernate5/boot-plugin/build.gradle:50). Rewrite rather than delete:CommandRegistry.findCommands, the fourCommandFactoryimplementations,GradleTaskCommandAdapter,HelpCommand,GroovyScriptCommand,TemplateRendererImpl,RenderStep,DefaultStepFactory'sProfileCommandgate (:44-47),populateContextLoader(keep the classpath part, drop:571,582-584).Gradle plugins (
grails-gradle/):GrailsGradlePlugin.groovy:166,461-490,782-784;GrailsPluginGradlePlugin.groovy:138-140;GrailsClasspathToolingModelBuilder.groovy:35,51-56andGrailsClasspath.getProfileDependencies; thegrails-profileandgrails-publish-profileplugins (plugins/build.gradle:143-160,profiles/*,ProfileCompilerTask;GroovyScriptCommandTransformstays while scripts are supported);ProfileCompilerTaskSpec;BomPlatformFunctionalSpec.groovy:76-98and its fixturetest-projects/bom-platform-default-dependencies/build.gradle:98.Root build: the seven
grails-profiles/*modules (settings.gradle:465-485),grails-spring-security/rest/testapp-profile(convert its features to packs or test fixtures),gradle/publish-root-config.gradle:172-191,build.gradle:76,163-165(profileProjects, unused),PublishPlugin.groovy:58,146-151,191-197,gradle/rat-root-config.gradle:73-76,161-166,settings.gradle:661-666andend-to-end/settings.gradle:132-137(DirectoryScanner workaround),grails-bom/base/build.gradle:78-94and theforcedGroupPrefixesentries in all five BOMs,etc/bin/verify-jar-artifacts.sh:208-236,etc/bin/reset-verify.sh:47,.github/dependency-graph/external-references.yml:42-48,197-203(the purls are wrong today anyway),RENAME.md:164-182,etc/bin/rename_gradle_artifacts.sh:305-347,INSTALL:98.In-repo consumers:
profile "..."in sevengrails-test-examples/*/build.gradle;grails.profilein 109application.ymlfiles (harmless at runtime, remove for hygiene);def profiles = ['web']in plugin descriptors (dead:DefaultGrailsPlugin.profilesis never assigned,DefaultGrailsPlugin.java:117,139-147) and in Forge'splugin.gsp:44-47.Docs (
grails-doc/src/en/guide/): the wholeprofileschapter (toc.yml:91-106, twelve pages) is replaced by a "Feature packs and presets" chapter;commandLine.adoc:20-71,112-122,interactiveMode.adoc:19-41,creatingCustomScripts.adoc,reusingGrailsScripts.adocandgradleBuild.adocare deleted or rewritten;creatingProject.adoc:19-37,creatingCustomCommands.adoc:21-69,219-272(theexecutionContext.environmentexample at:248is wrong today),gradleDependencies.adoc:27,61,gradleTasks.adoc,gradlePlugins.adoc:63-64,downloadingAndInstalling.adoc:24-93,creatingAnApplication.adoc,aHelloWorldExample.adoc,usingInteractiveMode.adoc,creatingArtefacts.adoc,generatingAnApplication.adoc,REST/restProfile.adoc,plugins/creatingAndInstallingPlugins.adoc:390-466,plugins/repositories.adoc:21-40,plugins/providingBasicArtefacts.adoc:21-68,127-141; the 47 command reference pages (five are profile-only);index.adoc:736includes a path that does not exist.GRAILS_PREFERRED_SHELLand the wrapper environment variables are undocumented today and need a home in the new chapter.5. Delivery
Project policy: nothing is removed in a minor release. Every removal in this plan (the profile modules and Gradle plugins, the shell's
create-*,list-profilesandprofile-info, the dispatcher with-tandGRAILS_PREFERRED_SHELL, the Spring Boot CLI port, theprofileGradle configuration, thegrails.profileactive-profile injection, the alias start scripts,org.grails.cli.GrailsCli) therefore lands in9.0.x, together. What8.1.xcan carry is additions, and replacements of an implementation that functions the same: the declarative engine, packs, the index reader,.grails/,feature add, the unifiedgrailscommand tree added alongside the profile shell, and existing commands re-implemented on Forge or on the console where the result is equivalent for the user. Whether8.1.xcarries that work or everything waits for9.0.xand ships at once is decision 6; the steps are the same either way, only the line moves.0
Prerequisites
8.1.x
Merge PR #16551 after resolving the conflict with the current
8.1.xtip; merge8.1.xup to9.0.x.Exit: Forge builds and tests green inside the composite build on both lines.
1
Declarative engine
8.1.x, additive, Forge only
DeclarativeFeature, descriptor schema and validator,ForgePagesdevelopment-mode compilation for pack directories with a compiled-class cache,Dependency.excludes, dynamic codegen command registration,--feature-pack-dir. The keyed build-file contribution API (extensions,blocks,imports,settings) with deterministic ordering; the eight feature-name branches inbuildGradle.gspand the BOM choice inbuildSrcBuildGradle.gspmove into the owning features; the droppedDependency.extensionbug fixed. Convert three to five simple compiled features (quartz, cache-ehcache, asciidoctor, web-console) to bundled packs as proof, with golden-output specs proving identical generation.Exit: packs render byte-identical output to the classes they replace;
buildGradle.gspcontains nofeatures.containsbranch; hosted Forge unchanged.2
Catalog, fetch and authoring
8.1.x, additive, plus grails-gradle and grails-plugins-metadata
Extend
index-plugins.groovyto detectMETA-INF/grails-forge/feature.yml(or theGrails-Forge-Packmanifest attribute) and recordforgeandsha256per version; an index reader in forge-core with the label-to-category table andgrailsVersioncompatibility filter;feature list/search/infoandplugin search/info; the pack fetcher with cache, repositories, proxies, checksums, path guards and the first-use notice;--features g:a:v; thesrc/main/forge/support in thegrails-pluginGradle plugin (descriptor validation, GSP check compilation, packaging, manifest attribute,forgePackTest); a fixture plugin ingrails-gradletest-projects/that uses it and is published tobuild/local-mavenand consumed by test-core through a local index file.Exit:
grails create-app x --features <gav>works offline from the cache and online from a local Maven repository;plugin search cachelists the real index entry; the fixture plugin's pack is built and validated by the Gradle plugin alone.3
.grails/andfeature add8.1.x, additive
project.ymlwriter and reader,.gitignoreentries,project migrate,feature diffCLI,feature addwith dry run and three-way apply; codegen gating acceptsproject.ymlandgrails-forge-cli.yml; Forge keeps writinggrails-forge-cli.ymlon 8.x so the existing codegen commands are unchanged.Exit: round trip in test-core: create,
feature add, build, run.4
Unified command tree and equivalent replacements
8.1.x, additions and same-behaviour replacements
The
grailslauncher gains the Picocli tree (feature,plugin,project,help --json, the Forge create and codegen commands) alongside the profile shell; the dispatcher,-tandGRAILS_PREFERRED_SHELLkeep working. Replacements allowed because they function the same:create-app,create-pluginandcreate-web-pluginimplemented by Forge once the dependency drift between the two generators is closed (#14944, #14933), with-t shellstill reaching the profile implementation; the shell's artefactcreate-*delegated to Forge codegen where the files produced are the same (the webcreate-controlleralso creates the views directory); lifecycle commands re-implemented as console built-ins behind the same names and flags while the profile scripts remain loadable. Profiles,grails.profileand theprofiledependency are still emitted and resolved.Exit: parity specs: for every replaced command, the same invocation produces the same files and effects on an 8.1 application before and after; the new commands work alongside.
5
Console rework and removals
9.0.x
Profile-free
CommandCatalog; built-in lifecycle commands; codegen delegated to Forge; script commands kept with the profile lookups removed and deprecated; dispatcher,-t,GRAILS_PREFERRED_SHELL, alias start scripts, the Spring Boot CLI port andorg.grails.cli.GrailsCliremoved;grails-profiles/*, the profile Gradle plugins, shell profile code, BOM constraints and release-script checks deleted; theprofileGradle configuration deleted (a declaredprofiledependency fails configuration with a pointer to the upgrade guide andproject migrate); thegrails.profileactive-profile injection removed; Forge stops emittinggrails.profile, theprofiledependency andgrails-forge-cli.yml;rest-api-plugintype, the eight missing artefact commands, gson scaffolding templates, the six script-only commands converted; agrails-intellij-pluginrelease supporting the 9.0 entry point ships with 9.0.0; startup measured.Exit: no
org.apache.grails.profilescoordinate anywhere in the build;grailsinside and outside a project needs no profile and no Aether; all shell specs rewritten against the catalog; a migrated 8.x application builds and runs; an unmigrated one fails with the pointer.6
Docs, website, UI
8.1.x for additions, 9.0.x for removals
A "Feature packs and presets" chapter and
upgrading81xnotes with the additions; the "Command line" chapter rewrite, the profiles chapter removal, the command reference pages andupgrading90xnotes with the removals; the website's index URL switched to theapache/organisation path; SDKMAN and distribution scripts; aTHREAT_MODEL.mdsection; "ship a feature pack" in thegrails-plugins-metadataREADME and the plugin authoring guide.Exit: the 8.1 guide documents packs next to profiles; the 9.0 guide builds without the profiles chapter.
Deferred to the major after 9.0: removal of script commands (
src/main/scripts,META-INF/commands,GroovyScriptCommand), which 9.0 keeps profile-free and deprecated.Rough sizing: steps 1 to 3 are each a few weeks of Forge-only work; step 5 is the largest single item because it rewrites the shell's dispatch and tests and carries every removal; step 6 is sustained documentation work that can run alongside the others.
6. Open decisions
META-INF/grails-forge/, produced by thegrails-pluginGradle plugin fromsrc/main/forge/with validation, GSP check compilation andforgePackTest. Add aforgeclassifier later only if download size becomes a problem.apache/grails-plugins-metadataas it is, with its indexer extended to flag feature packs and record checksums; Forge readsgrails-plugins-index.jsonfrom the repository'smainbranch, with the release's copy bundled as the offline fallback. No second catalog, no mirror..grails/project.ymlcommitted?cache/,run/,history.src/main/scripts,META-INF/commands)settings.xmlreader; do not reintroduce Maven Resolver.grails.profileas a Spring active profile--plain-outputand--non-interactivehonoured,grails help --jsonas the command catalog;org.grails.cli.GrailsCliand thegrails-shell-cliartifact stay untouched through 8.x and go in 9.0, with a plugin release that supports the new entry point shipping with 9.0.0 (the plugin resolves the CLI per project version, so 8.x projects are unaffected).afterPlugins,afterDependencies,end) as an escape hatch; typed channels preferred, and the Gradle plugin warns when a fragment could have been one. No pack ships abuild.gradletemplate or a text patch.7. Testing and documentation
grails-forge-core: specs for descriptor parsing and validation, dependency and platform mapping, environment configuration merging, GSP source compilation from a pack directory with the class cache, verbatim copies, path-escape rejection,requires/conflicts/oneOfbehaviour throughContextFactory, and golden-output comparisons for every converted feature usingCommandOutputFixture.generate.grails-gradle: functional tests for thesrc/main/forge/support (descriptor validation failures, GSP check compilation failures, packaging and manifest attribute,forgePackTest), on the fixture plugin.test-core: TestKit builds of generated apps that include bundled packs; a fixture plugin intest-projects/forge-feature-pack-pluginpublished tobuild/local-mavenand consumed both by coordinates and through a catalog file;feature addround trips.CommandCatalogprecedence, synonyms, abbreviations and hints; interactive dispatch with the existingTestTerminal; the legacy-command and app-local-command fixes ingrails-gradlefunctional tests.feature add, build, run, andproject migrateon an 8.0-generated app.-clicompanions) and a "Feature packs and presets" chapter (descriptor reference, catalog, authoring and testing a pack, publishing, security notes), plusupgrading81xentries for the additions and same-behaviour replacements andupgrading90xentries for every removed surface.Appendix A: command tree
Appendix B: facts the plan relies on
@Components found by scanningorg.grails.forge(ForgeCoreConfiguration.groovy:35-50), registered byFeatureRegistry(feature/FeatureRegistry.groovy:43-64).FeaturePhase.BUILD(GradleBuildCreator.groovy:34-74); later additions are lost.Dependencyhas no exclusions; versions come from the BOM, a literal, or apom.xmllookup (PomDependencyVersionResolver.groovy:103-119).ForgeCli.groovy:45-57) gated only by a marker file in the current directory (:115-128).FeatureDifferexists in core but is exposed only through the webDiffController.GrailsCli.groovy:385); the profile jars come from the Gradleprofileconfiguration via theGrailsClasspathtooling model (GrailsClasspathToolingModelBuilder.groovy:43-60); Aether is used only outside a project.build/; no.grails/project directory exists anywhere in the repository.grails.codegen.defaultPackagehas runtime readers;grails.profilebecomes an active Spring profile with awebdefault.-clicompanions are discovered from theGrails-Cli-Artifactmanifest attribute andMETA-INF/grails-cli.factorieswithout loading classes (GrailsCliGradlePlugin.groovy:203-307,451-476); that is the model the pack fetcher follows.apache/grails-intellij-plugin,main, 2026-10-11) starts its own JVM with main classorg.grails.cli.GrailsClion the resolvedgrails-shell-cliartifact (Grails3GradleCommandExecutor.java:54,GrailsModuleModelBuilderImpl.java:54-78), hard-codes 34 shell command names (Grails3CommandProvider.java:31-70), runsrun-appthe same way (GrailsRunConfiguration.java:70), detects projects bygrails-app(GrailsApplicationManager.java:167), and creates projects through the hosted Forge API (GrailsForgeModuleBuilder.kt:67-221).sql-tail(branchfeat/sql-tail-command, PR Add the query-tail command to find query-heavy pages #16631 on 9.0.x) is aGroovyScriptCommandscript ingrails-datamapping-core/src/cli/resources/META-INF/commands/sql-tail.groovythat follows a capture file written by the running application and never boots it;run-app --sql-tailis a flag added tograils-profiles/base/commands/run-app.groovy.DbmGormDiffCommandis anApplicationCommandthat needs the booted context (withGormDatabase(applicationContext, dataSource)).apache/grails-plugins-metadata: one YAML per plugin undergrails-plugins/<group path>/<artifactId>.yml(name,desc,coords,owner,vcs,docs,maven-repo,labels,licenses,versions, optionaldeprecated),index-plugins.groovyrun every eight hours by.github/workflows/updateIndex.yml, which downloads each new version's jar by exact URL and readsMETA-INF/grails-plugin.xml, andgrails-plugins-index.jsonconsumed byapache/grails-static-website(buildSrc/.../PluginsTask.groovy:67). 256 entries on 2026-10-13.Change log
dbm-*commands keep the context-bound default (DbmGormDiffCommand), andsql-taildefines the console-side mode, which gets a console services API (configuration, build directory, terminal, cancellation,GradleRunner,ServerInteraction,RunningApplication). Server-bound work goes through those services withrequiresConsole; part-way context needs delegate torunCommand; the built-inrun-appaccepts declared options so a plugin can add a flag such as--sql-tail. Appendix B updated.profileconfiguration,grails.profileinjection, dispatcher, Spring Boot CLI port andorg.grails.cli.GrailsCli, lands together in 9.0.x; the no-op configuration shim and theGrailsClifaçade are gone. Section 1, 2.1, 2.4, 2.5, section 3 rows, decisions 5, 6, 9 and 11, and testing updated.build.properties,extensions,blocks,imports,settings) with merge rules and deterministic ordering; the central template's feature-name branches and the droppedDependency.extensionbug move into phase 1; descriptor example, mapping table and decision 12 updated.apache/grails-intellij-plugin: new "IDE integration" under 2.5 with how it couples to the shell today and what the unified CLI must provide (stable entry point and artifact,help --jsoncatalog,.grails/project.ymldetection,bootRun). Section 3 row, phase 4, decision 11 and appendix B updated.grails-pluginGradle plugin automates pack validation, GSP check compilation, packaging andforgePackTestfromsrc/main/forge/. New "Command execution model" under 2.5. Sections 2.3, 2.7, phases 1, 2 and 6, decisions 1, 2 and 7, and testing updated.requires,when,flags, Mustache sections). Section 2.3: Forge readsgrails-plugins-index.jsonstraight from the repository'smainbranch; the mirror step was dropped from phase 6 and decision 3.apache/grails-plugins-metadataas the catalog: YAML schema, indexer behaviour, index statistics, pack detection in the indexer, no second catalog. Section 1, section 3, decision 3, phases 2 and 6, appendix B updated to match.Plan for apache/grails-core issue #16348, drafted against PR #16551. Related: #15301, #14081, #14944, #14932.
jdaugherty commentedon Oct 13, 2026
This is the claude artifact that's being used to iterate on this: https://claude.ai/artifact/ER75cLifGWEhU9YSryKQar
jdaugherty commentedon Oct 27, 2026
I've started work on this in a side branch that I intend to push in the next week.
Take the Forge CLI plugin commands out of the JLine 4 change
Say what the three removed commands of the rest-api profile were for
Leave the test commands of the REST API profiles out of the guide
Let the Grails wrapper of an earlier version update itself
Document update-wrapper and the wrapper that updates itself
227 remaining items
Give cache-ehcache the jaxb-runtime of the BOM instead of a range
Remove the settings of the Ehcache plugin from the cache metadata
Record the follow-ups of cache-ehcache in the design
Close the terminal of the interactive console when it is left
Refuse a project of Grails 7 or 8 also when --version follows the com…
Match the patterns of .gitignore and .gitattributes without backtracking
Wait for what a program wrote after the console thread is interrupted
Hand the shutdown hook of run-app what it reads through atomics
Ask repositories with one HTTP client for every command
Have ToolingApiRunAppSpec say why run-app ended before its applicatio…
Throw why a cache could not be created in the cache manager of cache-…
Describe a command by the name it sets over the one it inherits
Record the descriptor of a command that extends another in the design
Describe a command by the name the code that makes it leaves it with
Record how a command's name is read, and found when it cannot be