desruisseaux commented on code in PR #11632:
URL: https://github.com/apache/maven/pull/11632#discussion_r2678612031
##########
impl/maven-core/src/test/java/org/apache/maven/project/ProjectBuilderTest.java:
##########
@@ -470,4 +478,255 @@ void
testModularSourcesWithExplicitResourcesIssuesWarning() throws Exception {
assertTrue(mainModules.contains("org.foo.moduleA"), "Should have
resource root for moduleA");
assertTrue(mainModules.contains("org.foo.moduleB"), "Should have
resource root for moduleB");
}
+
+ /**
+ * Tests mixed source configuration where:
+ * - Modular sources are defined for main Java (should override
sourceDirectory)
+ * - Classic testSourceDirectory is used (should be preserved since no
modular test sources)
Review Comment:
See comment in `mixed-sources`: this is ambiguous if we have more than one
module. I suggest to modify the test for verifying that `<testSourceDirectory>`
has been ignored and a warning emitted.
Instead (maybe in a phase 3), for each module declared in a `<source>` with
`main` scope but no `test` scope, generate automatically the `<source>` with
`test` scope in a way similar to what is currently done for resources.
--
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]