【问题标题】:How to run "ant update" in Hybris with only "Update Running System"?如何仅使用“更新运行系统”在 Hybris 中运行“蚂蚁更新”?
【发布时间】:2017-04-14 18:31:27
【问题描述】:

我在构建我的 Hybris 项目后尝试从命令行运行 ant update,但它运行 更新运行系统从数据库中清除 hMC 配置创建基本数据本地化类型(请参考下图):

有没有办法从命令行运行ant update 命令,使其只选择“更新运行系统”?

我可以使用ant update 传递什么参数来仅运行“更新运行系统”而不运行任何其他选项?

【问题讨论】:

    标签: java deployment ant devops hybris


    【解决方案1】:

    您可以使用命令-DconfigFile=<your file>

    例子:

    ant updatesystem -Dtenant=<my tenant> -DconfigFile=path/to/my/config.json
    

    这里是 config.json 的一个例子

    {
      "init": "Go",
      "initmethod": "update",
      "clearhmc": "true",
      "essential": "true",
      "localizetypes": "true",
      "solrfacetsearch_sample": "true",
      "hmc_sample": "true",
      "solrfacetsearchhmc_sample": "true",
      "customerreview_sample": "true",
      "voucher_sample": "true",
      "promotions_sample": "true",
      "basecommerce_sample": "true",
      "cms2_sample": "true",
      "cms2lib_sample": "true",
      "ticketsystem_sample": "true",
      "payment_sample": "true",
      "btg_sample": "true",
      "platformhmc_sample": "true",
      "commerceservices_sample": "true",
      "commercewebservicescommons_sample": "true",
      "acceleratorservices_sample": "true",
      "acceleratorcms_sample": "true",
      "yacceleratorfulfilmentprocess_sample": "true",
      "yacceleratorcore_sample": "true",
     ....
      "electronicsstore_importCoreData": [
        "yes"
      ],
      "electronicsstore_importSampleData": [
        "yes"
      ],
      "electronicsstore_activateSolrCronJobs": [
        "yes"
      ],
      "yacceleratortest_createTestData": [
        "yes"
      ],
      "yacceleratorcockpits_importCustomReports": [
        "yes"
      ]
    }
    

    如您所见,实现这个文件并不容易。按照Initializing and Updating SAP Hybris Commerce 的建议,转到HAC 一次,在网页中进行配置,然后单击转储配置。它会给你生成的 json 文件。

    【讨论】:

      【解决方案2】:

      尝试使用 ant ant updatesystem 。 要查看可能的命令(目标)列表,您可以编写 ant -p 。在那里您可以找到有关命令的更多信息。

      【讨论】:

        【解决方案3】:

        ant 更新系统 [-Dtenant=tenantID -DdryRun=true|false -DtypeSystemOnly=true|false -DconfigFile=PATH_TO_CONFIG_FILE]

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 2017-05-24
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2020-12-27
          • 1970-01-01
          相关资源
          最近更新 更多