slachiewicz opened a new pull request, #500:
URL: https://github.com/apache/maven-resources-plugin/pull/500

   Moves `mavenVersion` to the current RC and pins the same version explicitly 
in the Verify workflow.
   
   That surfaced a pre-existing bug. `MRESOURCES-131` sets `<skip>true</skip>` 
in `pluginManagement` and asserts the test resource is not copied; it has been 
failing since **4.0.0-rc-5** — main resources skips, `testResources` does not:
   
   ```
   --- resources:resources (default-resources) ---
   [INFO] Skipping the execution.
   --- resources:testResources (default-testResources) ---
   [INFO] Copying 1 resource from src/test/resources to target/test-classes
   ```
   
   `ResourcesMojo` and `TestResourcesMojo` both declare a private field named 
`skip`. They collapse into a single descriptor parameter for the 
`testResources` goal, and the configurator writes the superclass field — so 
`TestResourcesMojo`'s own field stays `false` whatever the build configured, 
and its guard never fires. Reading both restores the documented behaviour while 
keeping `maven.test.skip` and `maven.resources.skip` working as before.
   
   Renaming the field so the two stop shadowing is not an option: the 
descriptor generator then sees two parameters called `skip` for one goal and 
fails with `skip has been declared multiple times in mojo with goal: 
testResources`.
   
   `mvn verify -Prun-its` passes, 24 unit tests, 0 failures. Part of 
apache/maven#12676. Verified green on a fork before opening.


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