Duplicate class javax.el.ArrayELResolver found in modules jsp-api-2.1-6.1.14.jar (org.mortbay.jetty:jsp-api-2.1:6.1.14) and jsp-api-2.1.jar (javax.servlet.jsp:jsp-api:2.1) Dupli
Firstly compile should be replaced with implementation as it is deprecated. (i) this link provides a good explanation: https://discuss.gradle.org/t/how-to-exclude-transitive-dependency/2119/2 (ii) I searched a lot to find a workable way to go about doing this and most of the suggested methods failed. What actually worked was the following example: Note: duplicate definition of program class Problem: hadoop-common and hadoop-core shared numerous common classes that were causing conflict Solution: I managed to solve it by manually removing the duplicate .class files in the jar file. (i.e. (i) changing the extension from jar to zip (ii) extract it (iii) remove the .class files or the entire folder if it contains all the duplicate files (iv) change the extension from zip back to jar Note do not extract the jar files with Winrar and try to zip them back, for some odd reason that doesn't work. I had to navigate to the Gradle cache: C->Users-> Username -> .gradle -> caches -> modules-2 -> files-2 -> org.apache.hadoop -> find either hadoop-common or hadoop-core and apply the above to delete the folders with duplicate classes