Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile DropWizard without the Shade plugin?

I'm trying to get my DropWizard project working, but I am unable to compile it without getting a million duplicate dependency errors. The errors are caused by the Shade plugin and my com.thinkaurelius.titan plugin. Titan refuses to compile without the duplicate errors when Shade is used, so I'd like to get rid of shade.

When I try compiling my project without Shade, java is unable to find the class with my main method.

Any ideas? :)

Thanks.

like image 441
cjroth Avatar asked Jan 25 '26 15:01

cjroth


1 Answers

Shade plugin unzips all the dependency jars to make them available in classpath for your executable jar. Some of the dependencies bring common dependencies causing duplicate jars error. You could fix this problem by checking the dependency tree and excluding duplicate jars.

Steps to follow:

  1. mvn -DskipTests=true clean install
  2. mvn dependency:tree
  3. Exclude dependencies for duplicate ones
like image 55
happy to help Avatar answered Jan 28 '26 07:01

happy to help



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!