开发者

Create a hadoop jar with external dependencies using Gradle

开发者 https://www.devze.com 2023-01-16 20:48 出处:网络
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 th

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

精彩评论

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