内容|SAP Hybris Commerce的安装脚本内容解析( 二 )


 内容|SAP Hybris Commerce的安装脚本内容解析
文章图片
【 内容|SAP Hybris Commerce的安装脚本内容解析】插件installer-platform-plugin的实现位于installer文件夹的libs文件夹下面:
 内容|SAP Hybris Commerce的安装脚本内容解析
文章图片
setup实现的源代码:
```groovy
void setup() {
try {
beforeSetup.each { it() }
copyDriverJarIfNeeded()
storeLocalProperties()
storeLocalExtensions()
setupDone = true
log '>>>>>>>>>> Setting up platform properties/extensions ...... DONE'
} finally {
afterSetup.each { it() }
}
}
```
 内容|SAP Hybris Commerce的安装脚本内容解析
文章图片
关于recipe的更多说明,可以查看文件夹下的readme.txt:
 内容|SAP Hybris Commerce的安装脚本内容解析
文章图片
执行完setup之后,bin文件夹的父文件夹内,就会出现很多平级的文件夹:config, data, log, roles和temp.
 内容|SAP Hybris Commerce的安装脚本内容解析
文章图片
其中data文件夹存放的是数据库相关的内容:
 内容|SAP Hybris Commerce的安装脚本内容解析
文章图片
config文件夹: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"


推荐阅读