Hi Martin,

On 1.04.2025 10:17, Martin Desruisseaux wrote:
I am also afraid that such a structure will really break IDEs: Eclipse already breaks if there is a separate module descriptor for tests, putting multiple JPMS modules in the same Maven Project will probably also break IDEA.

Yes, it would require changes in IDEs. But the https://github.com/nipafx/module-tooling/ project has been started for discussing the problem of module support in tooling. The discussion includes developers from Oracle, IDEA, Eclipse, Gradle and Maven. The topic of modular project layout has been one discussion among others and I have not see resistance so far. The Eclipse developer already took some action in anticipation for that (improved support of the --module-source-path in Eclipse compiler) as a result of this discussion.

The https://github.com/nipafx/module-tooling/ repo seems to be private. Is there any public place to follow the discussion?


When it comes to JPMS and the current Maven Compiler Plugin, what I mostly miss it the possibility to have two source and output folders for tests: unit/whitebox tests need to break encapsulation and either run on the classpath or with `--patch-module`, while integration/blackbox tests should run from a separate JPMS module.

I can volunteer for implementing that. We currently have "test" which is interpreted as whitebox testing. We need to have the community to agree on a new scope for blackbox testing and add it to Maven Core. It would need to be added to `ProjectScope`, and I guess probably `DependencyScope` as well. After such scope has been added to the core, I can implement blackbox testing in the compiler plugin.

That would be nice. The "test" scope is currently heavily overloaded: it contains both compile and runtime dependencies for both whitebox and blackbox testing.

At Apache Logging I am not sure if we would be able to use the new scopes, since we use custom JUnit extensions in blackbox testing and we release them. We will probably always need at least two Maven Modules.

Piotr


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to