ascheman commented on code in PR #11505:
URL: https://github.com/apache/maven/pull/11505#discussion_r2637961948


##########
impl/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java:
##########
@@ -1099,6 +1123,193 @@ public Set<Entry<K, V>> entrySet() {
         }
     }
 
+    /**
+     * Context object for resource handling configuration.
+     * Groups parameters shared between main and test resource handling to 
reduce method parameter count.
+     */
+    private record ResourceHandlingContext(
+            MavenProject project,
+            Path baseDir,
+            Set<String> modules,
+            boolean modularProject,
+            ModelBuilderResult result) {}
+
+    /**
+     * Handles resource configuration for a given scope (main or test).
+     * This method applies the resource priority rules:
+     * <ol>
+     *   <li>Modular project: use resources from {@code <sources>} if present, 
otherwise inject defaults</li>
+     *   <li>Classic project: use resources from {@code <sources>} if present, 
otherwise use legacy resources</li>
+     * </ol>
+     *
+     * @param context the resource handling context containing project info
+     * @param resources the legacy resource list (from {@code <resources>} or 
{@code <testResources>})
+     * @param hasResourcesInSources whether resources are configured via 
{@code <sources>}
+     * @param scope the project scope (MAIN or TEST)
+     */
+    private void handleResourceConfiguration(

Review Comment:
   At least we wouldn't be the first users of trace levels (a quick search over 
the overall Maven code based revealed just one usage, and its already in the 
core: 
[DefaultRequestCache.java#L414](https://github.com/apache/maven/blob/d30ce5d6def1da2c2323e497e42a8e7d5cbb75f1/impl/maven-impl/src/main/java/org/apache/maven/impl/cache/DefaultRequestCache.java#L414)).
 And there has been some discussion among @gnodet and @michael-o on 
[MNG-7342](https://issues.apache.org/jira/browse/MNG-7342?redirect=false) 
(migrated to #8081).



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