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


##########
impl/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java:
##########
@@ -693,27 +693,27 @@ private void initProject(MavenProject project, 
ModelBuilderResult result) {
 
                 /*
                  * `sourceDirectory`, `testSourceDirectory` and 
`scriptSourceDirectory`
-                 * are ignored if the POM file contains at least one enabled 
<source> element
+                 * are not used if the POM file contains at least one enabled 
<source> element

Review Comment:
   And yet another use case: Assume we have the following structure:
   
   ```xml
   <build>
       <sources>
         <source>
           <scope>main</scope>
           <lang>resources</lang>
           <directory>src/main/custom-resources</directory>
         </source>
         <!-- No <source lang="java"> - expects implicit src/main/java? -->
       </sources>
     </build>
   ```
   
   I would think in a legacy directory structure but 4.1.0-model configuration 
(but no modules), the legacy directories should still be (implicitly) used, 
unless explicitly overridden. What do you think, @desruisseaux ?
   
   Said that: the classic values were defined as default by the super POM. Do 
we expect similar defaults by the super POM for <sources> as well?



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