【发布时间】:2021-12-29 10:27:34
【问题描述】:
有没有办法从 ant 构建过程中排除智能编辑 grunt rush 编译?这个 grunt 过程为完成 ant build 编译增加了将近 2 分钟。
【问题讨论】:
标签: hybris sap-commerce-cloud smartedit
有没有办法从 ant 构建过程中排除智能编辑 grunt rush 编译?这个 grunt 过程为完成 ant build 编译增加了将近 2 分钟。
【问题讨论】:
标签: hybris sap-commerce-cloud smartedit
rush build 在smartedittools 扩展内触发,因此即使您的店面中没有安装插件或根本没有店面(例如,当使用像 Spartacus 这样的解耦前端时)它也会执行
您可以使用smartedittools.only.build.once=true 标志告诉它只构建一次,请参阅smartedittools/project.properties 中的评论:
# Introduce new flag to skip smartedit build if bundle files(smartedit/apps/smartedit-master/dist/**) already generated.
# Smartedit dev team: Will keep value false by default since Rush incremental build working fine under git working tree.
# Other hybris team and Non-Smartedit partner: Use true to avoid build smartedit everytime in commerce-suite.zip env.
# Smartedit partner: Update the value on-demand, delete the smartedit bundle or change flag to true will build again.
smartedittools.only.build.once=false
【讨论】:
删除以下目录:
hybris/bin/modules/npm-ancillary/npmancillary/resources/npm/node_modules
使用ant addonunistall 命令卸载插件(可选,因为在不删除上述文件夹的情况下卸载插件不会减少构建时间,但是,在我看来,最好卸载它,所以开发人员致力于项目不会混淆):
ant addonuninstall -Daddonnames=smarteditaddon -DaddonStorefront.yacceleratorstorefront=yourstorefront
【讨论】:
您知道从哪个 build.xml 宏被调用,因此请在同一 build.xml 中注释该宏条目并放置在 config-->customize 目录[它应该遵循与原始文件相同的目录结构]
然后运行:
ant customize and ant clean all
【讨论】: