0

我想将 SmartEdit 安装到我们的项目中。我们的项目中没有自定义 yacceleratorstorefront,而是自定义 ycommercewebservices。

我将所有扩展(除了 ysmarteditmodule)添加到我们的扩展并运行

ant addoninstall -Daddonnames=smarteditaddon -DaddonStorefront.ycommcerwebservices=ourcustomercommercewebservices

出现ant clean all以下错误时:

   [yjavac] 1. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 6)
   [yjavac]     import de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.AbstractPageController;
   [yjavac]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   [yjavac] The import de.hybris.platform.acceleratorstorefrontcommons.controllers cannot be resolved
   [yjavac] ----------
   [yjavac] 2. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 7)
   [yjavac]     import de.hybris.platform.acceleratorstorefrontcommons.interceptors.BeforeViewHandler;
   [yjavac]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   [yjavac] The import de.hybris.platform.acceleratorstorefrontcommons.interceptors cannot be resolved
   [yjavac] ----------
   [yjavac] 3. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 28)
   [yjavac]     public class SmarteditaddonCmsPageBeforeViewHandler implements BeforeViewHandler
   [yjavac]                                                                    ^^^^^^^^^^^^^^^^^
   [yjavac] BeforeViewHandler cannot be resolved to a type
   [yjavac] ----------
   [yjavac] 4. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 38)
   [yjavac]     public void beforeView(final HttpServletRequest request, final HttpServletResponse response, final ModelAndView modelAndView)
   [yjavac]                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   [yjavac] The method beforeView(HttpServletRequest, HttpServletResponse, ModelAndView) of type SmarteditaddonCmsPageBeforeViewHandler must override or implement a supertype method
   [yjavac] ----------
   [yjavac] 5. ERROR in some_path_to_the_repo/core-customize/hybris/bin/custom/ourcustomercommerwebservices/web/addonsrc/smarteditaddon/de/hybris/platform/smarteditaddon/interceptors/beforeview/SmarteditaddonCmsPageBeforeViewHandler.java (at line 43)
   [yjavac]     final AbstractPageModel page = (AbstractPageModel) modelAndView.getModel().get(AbstractPageController.CMS_PAGE_MODEL);
   [yjavac]                                                                                    ^^^^^^^^^^^^^^^^^^^^^^
   [yjavac] AbstractPageController cannot be resolved to a variable
   [yjavac] ----------
   [yjavac] 5 problems (5 errors)

BUILD FAILED

我在https://answers.sap.com/questions/12771124/smarteditaddon-hybris-63-not-working.html中发现了一个与 SmartEdit 相关的类似问题。最后一个答案是:

我的店面中的 buildcallbacks.xml 似乎不是最新的。我将它与 yacceleratorstorefront 中的进行了比较,添加了缺失的部分,然后(在另外添加了一些缺失的文件之后),构建运行没有问题。

但是我们的项目中没有 yacceleratorstorefront。所以我将 yacceleratorstorefront/buildcallbacks.xml 与我们的customercommerwebservices/buildcallbacks.xml 进行了比较,但没有成功。

你有什么想法吗?

谢谢你的帮助!干杯菲利普

4

1 回答 1

0

我设法让它发挥作用。我已经从 localextensions.xml 中删除了 smarteditaddon 并且不运行插件安装。看来smartedit不需要spartacus的smarteditaddon……</p>

于 2020-08-05T09:23:11.330 回答