【问题标题】:gradle-cargo-plugin: How to add jars to the server's lib directory?gradle-cargo-plugin:如何将 jars 添加到服务器的 lib 目录?
【发布时间】:2015-10-07 03:29:28
【问题描述】:

我正在使用 cargoStartLocal 任务将 ear 模块部署到 JBoss 5.1.x 容器。我的货物配置如下所示:

cargo {
    containerId = 'jboss51x'

    local {
        homeDir = file(jbossHome)
        configHomeDir = file(jbossHome+"/server/test")
    }
}

这将创建一个带有空 jbossHome/server/test/lib 目录的 jbossHome/server/test 文件夹树。

我想知道如何在 cargoStartLocal 任务期间将 jar 添加到此文件夹。

如果我有访问权限,我将在https://github.com/bmuschko/gradle-cargo-plugin/wiki 上添加正确的答案并注明出处。 TIA。

【问题讨论】:

    标签: deployment gradle jboss5.x cargo


    【解决方案1】:

    这是我使用多个 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'
                }
                // ....
            }
    }
    

    【讨论】:

      猜你喜欢
      • 2012-02-02
      • 1970-01-01
      • 1970-01-01
      • 2018-09-28
      • 2014-03-08
      • 1970-01-01
      • 2015-08-24
      • 1970-01-01
      相关资源
      最近更新 更多