3

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.

cjroth
  • 173
  • 11

1 Answers1

3

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