gradle-cargo-plugin:如何将jar添加到服务器的lib目录中?
问题描述:
我正在使用cargoStartLocal任务将一个ear模块部署到JBoss 5.1.x容器。我的货物的配置是这样的:gradle-cargo-plugin:如何将jar添加到服务器的lib目录中?
cargo {
containerId = 'jboss51x'
local {
homeDir = file(jbossHome)
configHomeDir = file(jbossHome+"/server/test")
}
}
这将创建一个空的jbossHome /服务器/测试/ lib目录下一个jbossHome /服务器/ test文件夹树。
我想知道在cargoStartLocal任务期间如何将jar添加到此文件夹中。
如果我有权限,我会在https://github.com/bmuschko/gradle-cargo-plugin/wiki处添加正确的答案并附上wiki。 TIA。
答
这里是我做到了使用多封CONFIGFILE ...
cargo {
containerId = 'jboss51x'
local {
homeDir = file(JBOSS_DIST)
configHomeDir = file(JBOSS_DIST+'/server/' + JBOSS_SERVER_CONFIG)
configFile {
file = file('../../x/y/commons-beanutils-1.8.2.jar')
toDir = 'lib'
}
// ....
}
}