如何为 Hybris 2011 版本创建示例扩展

问题描述

我刚刚下载了最新的2011.1,尝试使用ant extgen命令创建认扩展,但是遇到如下错误

有人知道怎么处理吗?

extgen.xml:293: The following error occurred while executing this line:
extgen.xml:35: Source directory '${ext.develop.path}' for template 'training' does not exist.

解决方法

再次运行它,它应该可以运行第二次。

构建脚本中似乎确实存在一个可能已经存在一段时间的错误。我假设 ant extgen 是您打开包装后运行的第一件事。没有 config 文件夹,因此构建脚本执行了以下操作:

[input]  No config folder was found at /path/to/hybris/config.
[input]  Please choose the configuration template.
[input]  Press [Enter] to use the default value ([develop],production)

并且您选择了 develop

不幸的是,它将您的选择存储在变量 input.template 中,该变量与稍后脚本询问您希望基于哪个扩展模板时使用的名称相同。所以脚本看到变量已经有一个值并且不会询问你:

[input] Please choose a template for generation.
[input] Press [Enter] to use the default value (commercewebservices,commercewebservicestests,yacceleratorfulfilmentprocess,yacceleratormarketplaceintegration,yacceleratorordermanagement,yacceleratorstorefront,yaddon,ybackoffice,ycommercewebservices,ycommercewebservicestest,ydocumentcart,[yempty],yhacext,yocc,yoccaddon,yocctests,ysapproductconfigaddon,ysmarteditmodule,yvoid,ywebservices)

然后它尝试查找模板扩展 develop 并失败。

第二次运行它意味着您的 config 文件夹已经生成,它会正确询问您希望扩展基于哪个扩展。