matrei opened a new pull request, #16434:
URL: https://github.com/apache/grails-core/pull/16434

   ## Description
   
   Fixes #16432.
   
   `config-report` only documented properties in the `grails.`, `dataSource.` 
and `hibernate.` namespaces. A plugin that
   documents its own namespace in `META-INF/spring-configuration-metadata.json` 
got no section in the report, and its
   properties set by the application were listed under "Other Properties" 
without a description.
   
   The namespace filter keeps the metadata of libraries such as Spring Boot, 
which document more than a thousand
   properties, out of the report, so it stays. In addition, all properties from 
the metadata of Grails plugins are now
   included. A metadata resource belongs to a plugin when its classpath root, 
the JAR or directory it was loaded from, also
   contains `META-INF/grails-plugin.xml`. The roots of the plugin descriptors 
are collected once per report.
   
   None of the Grails modules currently document properties outside the three 
namespaces, so reports of existing
   applications are unchanged, apart from the sections of third-party plugins.
   
   `loadPropertyMetadata()` now delegates to a new 
`loadPropertyMetadata(ClassLoader)`, so the plugin detection can be
   tested with an isolated class loader.
   
   The Configuration Metadata section of the guide describes what the report 
includes.
   
   ### Tests
   
   `ConfigReportCommandSpec` gets two tests, using a plugin and a library as 
separate classpath roots:
   
   - the plugin's `acme.enabled` is loaded with its group, while the library's 
`server.port` is still left out and its
     `grails.library.enabled` is still included
   - `writeReport` documents the plugin property in its own section and not 
under "Other Properties"
   
   Both fail without the change and pass with it. The rest of 
`ConfigReportCommandSpec` passes, and
   `:grails-core:codeStyle` passes.
   


-- 
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