0

I have project X containing modules Y and Z. Module Y relies on module Z (a third party library which I maintain a private fork of).

On a maven build module Z relocates it's very version specific packages to a seperate package e.g "com.example.z.internal.MyClass" becomes "com.example.z.internal.v23.MyClass".

When I didn't have module Z in my project it was fine as IntelliJ resolved to the maven dependency which contained the remappings however now I have module Z within the project, IntelliJ keeps being clever and using the module as the dependency not the artifact.

Is there a way to force IntelliJ to only use the artifact as the dependency?

1 Answers1

0

First option: remove the module of your project, intellij will not recompile all the time this module, and make a separated project for it when you want to modify this module.

Second option: build a released version X of your module (not a snapshot) and make your module to depend on this released version. Doing that, intellij will continue to make your fork, but under a snapshot version which you don't depend on.

Prim
  • 2,880
  • 2
  • 15
  • 29