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

   ## Description
   
   Follow-up to #16434 (issue #16432). It addresses [the review 
comment](https://github.com/apache/grails-core/pull/16434#discussion_r4145662074)
 on that PR. The fix was pushed after the PR had already been merged, so it is 
not in 8.0.x yet.
   
   #16434 recognises the configuration metadata of a plugin when it is in the 
same classpath root as the plugin's `META-INF/grails-plugin.xml`. Inside a JAR 
that is always the case. When a plugin is on the classpath as the output 
directories of its Gradle build, the descriptor is written to the classes 
directory (`build/classes/groovy/main`), while a hand-written 
`src/main/resources/META-INF/spring-configuration-metadata.json` ends up in 
`build/resources/main`. Its properties were then left out of the report again.
   
   This happens:
   
   - when a plugin project runs `configReport` on itself
   - when plugins are used through the exploded variant (`bootRun`/`console` in 
development mode, or with `-Pforce.grails.exploded`), which publishes exactly 
these two directories
   
   When a descriptor's root is a Gradle classes directory, 
`…/classes/<language>/<sourceSet>/`, the sibling `…/resources/<sourceSet>/` is 
now also treated as a root of that plugin. Applications are not affected. They 
have no plugin descriptor, so their resources directory is never paired, and 
their own typed properties stay under "Other Properties".
   
   The guide paragraph no longer says the metadata must be "in its JAR". It now 
states that the default Gradle output directories also work. Custom 
`destinationDirectory`/`destinationDir` locations are not paired.
   
   ### Tests
   
   New test in `ConfigReportCommandSpec`: a plugin with its descriptor in 
`build/classes/groovy/main` and its metadata in `build/resources/main`, next to 
an application with the same layout and no descriptor. The plugin's 
`acme.enabled` is included and the application's `app.greeting` is still left 
out. The test fails without the change. All 20 tests in 
`ConfigReportCommandSpec` and `:grails-core:codeStyle` pass.
   


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