I'm writing an EJB jar module for a jboss ear application. I'm using gradle and I don't want to try to declare all of the different dependencies that the jar would rely on at runtime from JBoss. Is there a way to declare dependencies on all files within a directory tree.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
In the dependencies section of your build.gradle
file you can use a FileTree
reference. For example:
dependencies {
compile fileTree(dir: "${jbossDir}/client", includes: ['*.jar'])
}
This will include all of the JAR files in the JBoss / client directory as compile-time dependencies.