How to run "ant update" in Hybris with only "Update Running System"?
Asked Answered
D

5

5

I'm trying to run ant update from the command line after building my Hybris project but it runs Update Running System, Clear hMC Configuration from Database, Create essential data and Localize type (please refer the following image):

hybris console screen

Is there a way to run ant update command from command line so that it will only select "Update Running System"?

What parameter can I pass with ant update to only run "Update Running System" and not any other options?

Dizen answered 30/11, 2016 at 12:23 Comment(0)
S
12

You can use the command -DconfigFile=<your file> :

Example:

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

And here is an example of the 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"
  ]
}

As you can see, it's not so easy to implement this file. As suggested in Initializing and Updating SAP Hybris Commerce, go to the HAC once, do your configuration in the webpage and click on Dump configuration. It will give you the generated json file.

Supernal answered 30/11, 2016 at 14:24 Comment(0)
B
2

Try with ant ant updatesystem . To see the list of possible commands(targets) you can write ant -p . There you can find more about the commands.

Bailiwick answered 30/11, 2016 at 13:57 Comment(0)
B
2

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

Bessiebessy answered 1/12, 2016 at 5:2 Comment(0)
S
1

You can also use this command to update the system without importing any impexes.

ant updatesystem -DtypeSystemOnly=true  
Simms answered 30/3, 2022 at 14:12 Comment(0)
E
1

If you want to run the system with an ant updatesystem and don't import impexes during build you can only use the property update.importEssentialData.enabled=false and put it into your local.properties file.

Eighteen answered 22/6, 2023 at 7:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.