如何运行" ant update"在Hybris只有"更新运行系统"?

时间:2016-11-30 12:23:45

标签: java deployment ant devops hybris

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

hybris console screen

有没有办法从命令行运行ant update命令,以便它只选择" 更新运行系统"?

我可以使用ant update传递哪些参数,仅运行" 更新正在运行的系统"而不是其他任何选择?

3 个答案:

答案 0 :(得分:3)

您可以使用命令-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文件。

答案 1 :(得分:0)

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

答案 2 :(得分:0)

  

ant updatesystem [-Dtenant = tenantID -DdryRun = true | false   -DtypeSystemOnly = true | false -DconfigFile = PATH_TO_CONFIG_FILE]