我使用cargoStartLocal任务将ear模块部署到JBoss 5.1。x容器。我的货物配置看起来像这样:
cargo {
containerId = 'jboss51x'
local {
homeDir = file(jbossHome)
configHomeDir = file(jbossHome+"/server/test")
}
}
创建一个jbossHome/server/test文件夹树,其中包含一个空的jbossHome/server/test/lib目录。
我想知道如何在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'
}
// ....
}
}