开发者

Create a hadoop jar with external dependencies using Gradle

How do I create a hadoop jar that includes all dependencies in the lib folder using Gradle? Basically开发者_运维知识库, similar to what fatjar does.


Figured it out! Hadoop looks for libraries inside the "lib" folder of the final jar. So, add the following to the "jar" task.

 jar {
     doFirst {
         into('lib') {
             from configurations.runtime
         }
     }
 }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜