Skip to content

Latest commit

 

History

History
131 lines (84 loc) · 5.42 KB

File metadata and controls

131 lines (84 loc) · 5.42 KB

Plugin sap.commerce.build.ccv2

This plugins parses Commerce Cloud v2 manifest.json file and provides it to the Gradle build script.

If you also use the sap.commerce.build plugin, it preconfigures various tasks based on manifest.json

Configuration

The following example shows the full DSL (Domain Specific Language) with all default options and the dependencies the plugin pre-configures.

CCV2 {
    //target folder for the `generate*` tasks (details see below)
    generatedConfiguration = file('generated-configuration')

    //Use this property to access the manifest.json in your Gradle build script
    manifest = < parsed manifest.json >
}

If you also use sap.commerce.build in your build, the CCv2 plugin preconfigures hybris.version with commerceSuiteVersion or commerceSuitePreviewVersion (details see next heading) as defined in your manifest.json.

Preview Release Support

General information: Preview Releases

Starting with 5.0.0, the CCV2 plugin fully supports preview releases both for SAP Commerce Cloud (key commercePreviewVersion) and extension packs (key previewVersion in the extensionPacks array; more details here and here)

To get the currently effective version (regular or preview release, whatever is currently configured) in your Gradle build script use CCV2.manifest.effectiveVersion (String getEffectiveVersion()).

If your build needs to handle preview versions differently, you can check if a preview release is configured with CCV2.manifest.preview (boolean isPreview())

Important

Preview Releases - Default Maven Coordinates

If you use commerceSuitePreviewVersion or previewVersion of an extension pack, it changes the groupId of the dependency to de.hybris.platform.preview instead of the default value de.hybris.platform of regular releases.

Maven coordinates of commerceSuitePreviewVersion:

de.hybris.platform.preview:hybris-commerce-suite:${commerceSuitePreviewVersion}@zip

Maven coordinates of an extension pack defining previewVersion:

de.hybris.platform.preview:${name}:${previewVersion}@zip

extenionPacks Support

All artifacts configured as additional extensionPacks in your manifest.json will also be unpacked into the root of your repository during bootstrapPlatform. This allows you to easily bootstrap e.g. the "Integration Extension Pack" locally.

See also:

How are extensionPacks resolved as Maven artifacts?

  • If name / version is supplied:
    de.hybris.platform:${name}:${version}@zip
  • If artifact is supplied:
    ${artifact} (as is, without any changes)
    (If artifact is configured, name and version are ignored, as specified in the docs)

Tasks

The plugin defines the following tasks

validateManifest

Validate manifest.json for common issues. If errors are detected, the task fails. Warnings are logged, but do not cause the task to fail.

You can find all possible errors and warnings in ccv2-validation.md

installManifestAddons

Only available if the build also uses sap.commerce.build

Runs ant addonistall for all addons defined in storefrontAddons of the manifest.

cloudTests

Only available if the build also uses sap.commerce.build

Runs ant alltests preconfigured with the values of the tests object of the manifest

cloudWebTests

Only available if the build also uses sap.commerce.build

Runs ant webtests preconfigured with the values of the webTests object of the manifest

generateCloudProperties

Generates *.properties files (into the folder configured by CCV2.generatedConfiguration) per aspect and persona as defined in manifest.json.

Filename schema: <aspect>_<persona>.properties.

The aspect common is used for the properties that are shared between all aspects.

generateCloudLocalextensions

Generates a localextensions.xml file (into the folder configured by CCV2.generatedConfiguration) based on the extensions list in the manifest.