简体   繁体   English

如何使用店面附加组件部署Hybris

[英]How to deploy hybris with storefront addon

We are using the b2bacceleratoraddon and commerceorgaddon addons in our hybris 6.5.0.1. 我们在hybris 6.5.0.1中使用b2bacceleratoraddoncommerceorgaddon插件。

For the local development it is enough to run the ant addoninstall command. 对于本地开发,只需运行ant addoninstall命令即可。 But what is the official way to integrate these addons in a deployment process? 但是将这些插件集成到部署过程中的正式方法是什么? We tried to check-in the generated sources in the repository but that does not seem to work. 我们尝试在存储库中签入生成的源,但这似乎不起作用。

We don't want to manually install the plugin after every deployment. 我们不想在每次部署后手动安装插件。

Also, as we are doing our deployments with ydeploy , is there a way to integrate this in the ydeploy process? 另外,当我们使用ydeploy进行部署时,是否有办法将其集成到ydeploy流程中?

在hybris config文件夹中有一个名为localextensions.xml的文件,您可以在其中选择项目将使用的扩展名。

The ant addoninstall task is meant to be executed only once. ant addoninstall任务只能执行一次。 It manipulates some files die the addon to work correctly. 它会操纵一些文件,使其无法正常运行。 These files are: 这些文件是:

  • myaddon/project.properties myaddon / project.properties
  • mystorefront/extensioninfo.xml mystorefront / extensioninfo.xml

The first file is created with properties that register the addons JavaScript and CSS sources as well as a property which includes the addons spring web context in the storefronts web context. 创建第一个文件时,该属性具有注册插件JavaScript和CSS源的属性,以及在店面Web上下文中包括addons spring Web上下文的属性。

In the second file it created a dependency from the storefront to the addon. 在第二个文件中,它创建了一个从店面到插件的依赖项。 That way during startup spring beans of the addon are created before the storefront beans are created. 这样,在启动期间,将在创建店面Bean之前创建插件的Spring Bean。 Also during build, hybris copies the addons web sources into designated folders in the storefront extension. 同样在构建过程中,hybris将插件Web源复制到店面扩展中的指定文件夹中。

So as long as you deploy these files along with the other files, you can skip the addoninstall task. 因此,只要将这些文件与其他文件一起部署,就可以跳过addoninstall任务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM