SAP Hybris(Commerce)安装recipe包含的三个任务,setup, initialize和start

简介: SAP Hybris(Commerce)安装recipe包含的三个任务,setup, initialize和start

image.png Setup = Invoked by default if no task is specified with install command. It installs recipe & copies files.

(2) Initialize = Initializes the recipes application.

(3) Start = Start the application.


https://www.novusedu.com/wp-content/uploads/2017/12/4-Hybris-Install.pdf


在recipe文件夹里看到的build.gradle内容里包含的setup任务:


image.png使用的两个plugin:


installer-platform-plugin

installer-addon-plugin

https://stackoverflow.com/questions/32352816/what-the-difference-in-applying-gradle-plugin#:~:text=The%20plugins%20block%20is%20the%20newer%20method%20of,method%20of%20adding%20a%20plugin%20to%20your%20build.


两种声明plugin使用的方式:


image.png

apply plugin: 'someplugin1'
apply plugin: 'maven'
and other one:
plugins {
   id 'org.hidetake.ssh' version '1.1.2'
}

image.png给一个Gradle项目应用plugin,可以扩展该project的功能:


(1) Extend the Gradle model (e.g. add new DSL elements that can be configured)

(2) Configure the project according to conventions (e.g. add new tasks or configure sensible defaults)

(3) Apply specific configuration (e.g. add organizational repositories or enforce standards)


plugin的类型

There are two general types of plugins in Gradle, binary plugins and script plugins - 分为二进制插件和脚本插件两类。


Binary plugins are written either programmatically by implementing Plugin interface or declaratively using one of Gradle’s DSL languages. Binary plugins can reside within a build script, within the project hierarchy or externally in a plugin jar.


Script plugins are additional build scripts that further configure the build and usually implement a declarative approach to manipulating the build. They are typically used within a build although they can be externalized and accessed from a remote location.


https://docs.gradle.org/current/userguide/plugins.html


plugin的解析


image.png一旦插件解析成功之后,在build script内可以使用其API.


Script plugins are self-resolving in that they are resolved from the specific file path or URL provided when applying them. - 脚本插件是自动解析的。


Core binary plugins provided as part of the Gradle distribution are automatically resolved. Gradle发行版里自带的核心二进制插件自动被解析。


再回过头来看Hybris recipe文件夹下的build.gradle的三个任务:


setup任务使用了插件installer-platform-plugin的setup方法:


image.pngimage.pngsetup实现的源代码:

    void setup() {
        try {
            beforeSetup.each { it() }
            copyDriverJarIfNeeded()
            storeLocalProperties()
            storeLocalExtensions()
            setupDone = true
            log '>>>>>>>>>> Setting up platform properties/extensions ...... DONE'
        } finally {
            afterSetup.each { it() }
        }
    }

image.pngimage.pngimage.pngimage.pngconfig文件夹:It has all config files. Instead modifying files in platform folder, modify them in the config folder (localextensions.xml / local.properties). If you are sure what you doing, then you can also do in platform folder.


为什么Hybris第一次启动前需要先build?

(1) Hybris is extendable complex solution. During build, all referenced components are integrated. (2) Runtime files and configuration files are created, prepared, and validated.

(3) Some parts of Hybris are compiled, such as: - Service Layer & Other Hybris Components


使用ant和maven进行build:


(1) Compiling Source code into Binary code

(2) Generates & compiles Model classes based on definitions in “*-items.xml” file

(3) Running tests

(4) Deployment to production systems

(5) It builds every extension listed (or) referenced by “localextensions.xml”


相关文章
|
3月前
|
IDE JavaScript 开发工具
什么是 SAP Fiori tools 的 environment check 功能
什么是 SAP Fiori tools 的 environment check 功能
30 0
|
7月前
|
XML 中间件 开发工具
SAP Fiori Tools 和对应的 CLI (Command Line Interface)
SAP Fiori Tools 和对应的 CLI (Command Line Interface)
38 0
|
8月前
|
Web App开发 人工智能 JSON
使用 cx recipe 安装 Hybris Commerce Cloud 之后,遇到 indexer workder failed 错误
使用 cx recipe 安装 Hybris Commerce Cloud 之后,遇到 indexer workder failed 错误
47 0
|
8月前
|
前端开发 Java 数据库
SAP Hybris recipe 为 cx 的安装和初始化
SAP Hybris recipe 为 cx 的安装和初始化
44 0
|
Java Maven 数据库
SAP Hybris(Commerce)安装recipe包含的三个任务,setup, initialize和start
SAP Hybris(Commerce)安装recipe包含的三个任务,setup, initialize和start
131 0
SAP Hybris(Commerce)安装recipe包含的三个任务,setup, initialize和start
SAP Fiori extension hook added via note
SAP Fiori extension hook added via note
SAP Fiori extension hook added via note
How to add application to Fiori launchpad
How to add application to Fiori launchpad
116 0
How to add application to Fiori launchpad
upload Fiori application to ABAP server via report /UI5/UI5_REPOSITORY_LOAD
upload Fiori application to ABAP server via report /UI5/UI5_REPOSITORY_LOAD
111 0
upload Fiori application to ABAP server via report /UI5/UI5_REPOSITORY_LOAD
|
JSON 数据格式
SAP Fiori : Response from creating in local store
SAP Fiori : Response from creating in local store
|
Web App开发
Fiori My Task App Performance Analysis
Fiori My Task App Performance Analysis
Fiori My Task App Performance Analysis