matrei opened a new issue, #16432:
URL: https://github.com/apache/grails-core/issues/16432

   ### Versions
   
   - Grails 8.0.0-RC2
   
   ### Description
   
   `config-report` builds its sections from the 
`META-INF/spring-configuration-metadata.json` resources on the classpath,
   but `ConfigReportCommand.isGrailsProperty` only accepts properties whose 
names start with `grails.`, `dataSource.` or
   `hibernate.`:
   
   ```groovy
   boolean isGrailsProperty(String name) {
       name.startsWith('grails.') || name.startsWith('dataSource.') || 
name.startsWith('hibernate.')
   }
   ```
   
   A Grails plugin that documents its configuration under its own namespace in 
Spring Boot configuration metadata is
   therefore left out of the report. Its groups get no section, and its 
properties that are set in the application are
   listed under "Other Properties" without a description or default.
   
   For example, the Inertia.js plugin (`io.github.matrei:grails-inertia`) 
documents its `inertia.*` properties with
   groups, descriptions and defaults. In an application using it, `./gradlew 
configReport` shows no Inertia section, and
   `inertia.favicon`, which the application sets, appears only under "Other 
Properties".
   
   The prefix filter is understandable: Spring Boot's own jars document more 
than a thousand properties, which would
   flood the report.
   
   ### Steps to reproduce
   
   1. Add a plugin to an application whose jar contains 
`META-INF/spring-configuration-metadata.json` describing
      properties outside `grails.*`, for example a group `acme` with a property 
`acme.enabled`.
   2. Set one of those properties in `application.yml`.
   3. Run `./gradlew configReport`.
   
   ### Expected
   
   A section for the plugin's group, with the descriptions and defaults of its 
properties.
   
   ### Actual
   
   No section for the plugin. The property set in `application.yml` is listed 
under "Other Properties" without a
   description.
   
   ### Possible fixes
   
   - Include the metadata of Grails plugin jars, recognised by 
`META-INF/grails-plugin.xml`, regardless of the property
     prefix, while keeping the prefix filter for other jars such as Spring 
Boot's.
   - Or make the included prefixes configurable, so an application can add the 
namespaces of the plugins it uses.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to