desruisseaux commented on code in PR #11632: URL: https://github.com/apache/maven/pull/11632#discussion_r2678613092
########## impl/maven-core/src/test/projects/project-builder/sources-mixed-modules/pom.xml: ########## @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Tests mixed source configuration within <sources>: + - Some <source> elements WITH module + - Some <source> elements WITHOUT module + + This tests: + 1. All sources are added (both modular and non-modular) + 2. sourceDirectory is IGNORED (because <source scope="main" lang="java"> exists) + 3. Resources behavior depends on module count +--> +<project xmlns="http://maven.apache.org/POM/4.1.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.1.0 https://maven.apache.org/xsd/maven-4.1.0.xsd"> + <modelVersion>4.1.0</modelVersion> + + <groupId>org.apache.maven.tests</groupId> + <artifactId>sources-mixed-modules-test</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>jar</packaging> + + <build> + <!-- This should be IGNORED because <sources> has main java --> + <sourceDirectory>src/should-be-ignored/java</sourceDirectory> + + <sources> + <!-- Modular source --> + <source> + <scope>main</scope> + <lang>java</lang> + <module>org.foo.moduleA</module> + </source> + <!-- Non-modular source (no module attribute) --> Review Comment: Should not be allowed. Either a project is fully modular or fully classic, but not a mix of both. The compiler plugin will not be able to handle that. -- 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]
