Maven: Use custom extended dependency resolution

In our company we use have an extension to the current maven version (3.6.3) that enhances the the dependency resolution for our needs. The aim of this extension is to provide a runtime dependency for some projects. E.g. there's a project "implementation" that depends on a project "supplier" and implements from there. Then there's a project "consumer" that depends on the project "supplier". In our use-case the project "implementation" is then added as a runtime dependency to the project "consumer", which is what our extension does.

My problem now is, that IntelliJ doesn't use our extended maven for dependency resolution and doens't add the runtime dependency, even though I added as the maven version to use in the settings.

We had the same problem with Eclipse and had to patch the Eclipse maven plugin to achieve this, as Eclipse uses the embedded maven version for dependency resolution. I'd assume IntelliJ uses a similar approach? So my question would be, how it would be possible to use our extended maven for dependency resolution in IntelliJ?

Attached are the two images of the dependency tree, first in Eclipse (with the runtime dependency) and second in IntelliJ (using the MavenHelper plugin).

This is a test case I use for reference, which I expect to succeed.

public class ExtensionPointsTest
public void hasRuntimeDependency() throws ClassNotFoundException
// this is a class in the "implementation" project

Please sign in to leave a comment.