War plugin causes package to be accessible from more than one module

Are you really using Eclipse WTP functionality (e.g. deployment assembly, server tools) or is it more an unwanted side effect of using the War plugin from Gradle? Or would it be sufficient to deploy and start the application externally?

I’m using WTP server tools. I have this simplified setup in the Servers view
image

Server uses the war plugin so it can be deployed from Eclipse. Shared uses the eclipse-wtp plugin so it can be deployed as a dependency (see Eclipse WTP + Gradle Buildship not deploying all project dependencies - #4 by donat). I start and stop the server from within Eclipse, it’s very convenient, especially for debugging.

Have you also tried the suggested solution to set the org.eclipse.jdt.core.compiler.ignoreUnnamedModuleForSplitPackage property?

I didn’t because the solution you provided with changing the classpath order in the gradle build script worked and it’s more transparent than a hidden configuration file. Should I prefer the compiler option for some reason?

We should investigate, if the Maven Integration for Eclipse WTP handles this situation better. When this is the case, Eclipse Buildship could possibly also improved. It would also be interesting what happens without a build system like Gradle or Maven - or when using the Gradle standalone project generator.

Is there a submitted issue to track this somewhere so it won’t get lost? I can create one, but is it in the buildship repo or in some wtp-reated repo?