1

I've read a number of sources regarding the createReducedDependencyPom of the maven-shade-plugin:

I understand it will create a pom with the dependencies that were shaded removed, so as downstream dependencies on the shaded jar would not process again those dependencies that are accessible from the shaded jar.

Yet, I can't understand in which situation one would change the default value (true) to false.

Can anyone provide an example of when this is useful?

dacucar
  • 206
  • 3
  • 10
  • Maybe overriding the value via a property, which would be dependant on different factors, e.g. if it's a testing environment for debugging etc. – Lino Jan 20 '20 at 15:48

1 Answers1

0

While having createDependencyReducedPom set to true is useful when using the shaded artifact (jar) as a dependency for other projects, I have recently encountered an issue where running my multi-module maven build in parallel with more than 1 thread would cause the maven-shade-plugin to go into an infinite loop and block the build forever.

Disabling the creation of dependency-reduced-pom files is the way to get around that issue for me.

Another reason why you wouldn't want to create dependency-reduced-pom is when the shaded jar being built is an application and not a library to be resued elsewhere.

Aditya Vikas Devarapalli
  • 3,186
  • 2
  • 36
  • 54