Gradle: Include jar dependencies into ear/libs

给你一囗甜甜゛ 提交于 2019-12-10 17:37:01

问题


I'm using Gradle to create an ear, but I'm having a hard time figuring out how to properly include dependencies in the lib folder.

I know that I can use

earlib project (group:name:version)

to include jars there. And that also those jars' compile dependencies are going to be added in the ear's lib folder.

My problem is that I also have jars that are listed in the ear's build.gradle as

deploy project (':jar-name')

How can I add their dependencies in the lib folder?

The only way I found is to add them as earlib or as dependencies of an earlib, but this forces me to write them twice and feels harder than it should be (with Maven you just need to specify your dependencies in the subprojects and they will be added in the ear\lib directory)

EDIT

Basically what I would like to end up with, is a transitive deploy configuration.

来源:https://stackoverflow.com/questions/33542669/gradle-include-jar-dependencies-into-ear-libs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!