【问题标题】:select maven modules at Jenkins/Hudson builds在 Jenkins/Hudson 构建中选择 maven 模块
【发布时间】:2012-02-15 03:09:20
【问题描述】:

我的 Jenkins 构建服务器有很多模块。我不想为每个模块声明新模块,而是想在树视图中开始构建之前共享一个通用配置并选择我的模块。假设我的根父项目有 A、B、C、D 项目,每个项目都有 A1、A2、B1、B2、B3 等...我想选择 B1、A1 仅用于构建。

有这个插件吗?

谢谢

【问题讨论】:

    标签: build continuous-integration hudson jenkins parameterized


    【解决方案1】:

    您可以使用 Maven3 advanced reactor options 的一个功能并选择您要构建的项目,即:

    mvn -pl B1,A1
    

    您可以使用额外的开关来决定如何处理依赖项目:

    -pl, --projects
        Build specified reactor projects instead of all projects
    -am, --also-make
        If project list is specified, also build projects required by the list
    -amd, --also-make-dependents
        If project list is specified, also build projects that depend on projects on the list
    

    在这种情况下,提供项目列表是小菜一碟,使用项目参数作为最明显的例子。您甚至可以创建一个插件来支持使用 Maven 模块名称和工件 ID 作为名称/值的自定义参数类型。

    【讨论】:

      猜你喜欢
      • 2011-08-05
      • 2012-04-15
      • 2018-10-25
      • 2016-10-30
      • 1970-01-01
      • 2012-05-06
      • 2011-09-17
      • 2014-10-30
      • 2012-02-13
      相关资源
      最近更新 更多