gnodet opened a new pull request, #11228: URL: https://github.com/apache/maven/pull/11228
This commit fixes issue #11135 where dependencies with missing groupId but present version were not having their groupId inferred from the project groupId in Maven 4.1.0 model version. The issue was that the groupId inference logic was only triggered when both groupId and version were missing (in the inferDependencyVersion method). However, the issue described cases where dependencies had versions but missing groupIds. Changes made: 1. Modified transformFileToRaw method in DefaultModelBuilder to handle missing groupId cases separately from missing version cases 2. Added new inferDependencyGroupId method that specifically handles groupId inference when version is present 3. Added unit test to verify the fix works correctly The fix ensures that for Maven 4.1.0 model version, dependencies with missing groupId will have their groupId inferred from the project groupId, regardless of whether the version is present or not. Fixes #11135 -- 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]
