Hiteshsai007 commented on PR #12369:
URL: https://github.com/apache/maven/pull/12369#issuecomment-4811528937

   
   Thanks for the review! I've updated the PR to resolve the profile collision 
highlighted in the pre-existing note:
   
   * **The Issue:** When both `jacoco` and `mockito` profiles were active, the 
`jacoco` profile's direct `surefire` plugin configuration overrode the 
`mockito` profile's `pluginManagement` configuration, dropping the Mockito 
`-javaagent`.
   * **The Fix:** Refactored the `surefire` and `failsafe` `argLine` in 
`pom.xml` to be dynamically composed using properties:
     - Added default `<argLine.xmx>-Xmx256m</argLine.xmx>` and 
`<argLine.mockito />` properties.
     - Set the default plugin configuration to: `${argLine.xmx} 
@{jacocoArgLine} ${argLine.mockito}`.
     - The `mockito` profile now only defines the `<argLine.mockito>` property.
     - The `jacoco` profile now only overrides `<argLine.xmx>` to `-Xmx1G` (and 
no longer overrides the plugin's `argLine` configuration directly).
   
   This ensures both profiles can be active at the same time without 
conflicting or dropping each other's parameters.


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