ascheman opened a new pull request, #11632:
URL: https://github.com/apache/maven/pull/11632

   ## Summary
   
   - Replace boolean flags (`hasMain`, `hasTest`, `hasMainResources`, etc.) 
with flexible set-based tracking using `SourceHandlingContext`
   - Rename `ResourceHandlingContext` to `SourceHandlingContext` to reflect 
unified handling of all source types
   - Add duplicate detection: first enabled source wins, duplicates trigger 
WARNING
   - Add `hasSources(Language, ProjectScope)` method for checking source 
existence
   - Replace `Collectors.toList()` with `.toList()` (Java 17+ idiom)
   
   Closes #11612 (Phase 2: build-sources-validation)
   
   ## Test plan
   
   - [x] `ProjectBuilderTest` passes (19 tests)
   - [x] New tests added:
     - `testModularSourcesInjectResourceRoots` - verifies module-aware resource 
injection
     - `testModularSourcesWithExplicitResourcesIssuesWarning` - verifies legacy 
resource warnings
     - `testMixedSourcesModularMainClassicTest` - mixed modular/classic 
configuration
     - `testSourcesMixedModulesWithinSources` - mixed modules within `<sources>`
     - `testMultipleDirectoriesSameModule` - multiple directories per module
     - `testDuplicateEnabledSources` - duplicate detection with WARNING
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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