2

我已按照以下链接并行安装 B2B 和 B2C 商店

https://wiki.hybris.com/pages/viewpage.action?spaceKey=accdoc&title=Installing+B2C+and+B2B+Accelerators+in+Parallel

之后,按照这些步骤,我能够获得 OOB 电子产品和电动工具商店。

现在,我将使用 modulegen 创建自己的自定义 B2C 商店。

但是,我收到以下错误:

    Trying to override old definition of task lesscss
Trying to override old definition of task movelibs
Trying to override old definition of task generatevariables

modulegen:
    [input]
    [input] Please choose a template for generation.
    [input] Press [Enter] to use the default value (acceleratorordermanagement, [accelerator], chinaaccelerator, commercewebservices, b2baccelerator)

    [input]
    [input] Please choose the name of your module extension. It has to start with a letter followed by letters and/or numbers.
    [input] Press [Enter] to use the default value [training]
merchandise
    [input]
    [input] Please choose the base package name of your extensions. It has to fulfill java package name convention. Each extension in the module will add its name to this package.
    [input] Press [Enter] to use the default value [org.training]
de.hybris.merchandise
     [echo] Using extension template source: C:\hybris-commerce-suites-5.7.0.3\hybris\bin\ext-template\yacceleratorcore
     [echo] Using extension template source: C:\hybris-commerce-suites-5.7.0.3\hybris\bin\ext-template\yacceleratorfacades
     [echo] Using extension template source: C:\hybris-commerce-suites-5.7.0.3\hybris\bin\custom\yb2bacceleratorstorefront
     [echo] Using extension template source: C:\hybris-commerce-suites-5.7.0.3\hybris\bin\ext-template\yacceleratortest
     [echo] Using extension template source: C:\hybris-commerce-suites-5.7.0.3\hybris\bin\ext-template\yacceleratorstorefront
     [echo] Using extension template source: C:\hybris-commerce-suites-5.7.0.3\hybris\bin\ext-template\yacceleratorfulfilmentprocess
     [echo] Using extension template source: C:\hybris-commerce-suites-5.7.0.3\hybris\bin\ext-template\yacceleratorinitialdata
     [echo] Using extension template source: C:\hybris-commerce-suites-5.7.0.3\hybris\bin\ext-template\yacceleratorcockpits
     [echo] Processing extension yacceleratorcore
    [mkdir] Created dir: C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris\extgen\yacceleratorcore
     [echo] Copying template files from C:\hybris-commerce-suites-5.7.0.3\hybris\bin\ext-template\yacceleratorcore to C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris/extgen/yacceleratorcore
     [copy] Copying 474 files to C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris\extgen\yacceleratorcore
     [echo] Replacing tokens in template files: C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris/extgen
  [replace] Replaced 428 occurrences in 100 files.
     [copy] Copying 474 files to C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris\extgen_final\yacceleratorcore
     [echo] Processing extension yacceleratorfacades
    [mkdir] Created dir: C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris\extgen\yacceleratorfacades
     [echo] Copying template files from C:\hybris-commerce-suites-5.7.0.3\hybris\bin\ext-template\yacceleratorfacades to C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris/extgen/yacceleratorfacades
     [copy] Copying 70 files to C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris\extgen\yacceleratorfacades
     [echo] Replacing tokens in template files: C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris/extgen
  [replace] Replaced 117 occurrences in 40 files.
     [copy] Copying 70 files to C:\hybris-commerce-suites-5.7.0.3\hybris\temp\hybris\extgen_final\yacceleratorfacades
     [echo] Processing extension yb2bacceleratorstorefront

BUILD FAILED
C:\hybris-commerce-suites-5.7.0.3\hybris\bin\platform\build.xml:121: The following error occurred while executing this line:
C:\hybris-commerce-suites-5.7.0.3\hybris\bin\platform\resources\ant\modulegen.xml:324: The following error occurred while executing this line:
C:\hybris-commerce-suites-5.7.0.3\hybris\bin\platform\resources\ant\modulegen.xml:330: The following error occurred while executing this line:
C:\hybris-commerce-suites-5.7.0.3\hybris\bin\platform\resources\ant\modulegen.xml:45: extgen.properties in source extension not found! this is not a template!

Total time: 22 seconds

C:\hybris-commerce-suites-5.7.0.3\hybris\bin\platform>

本地扩展.xml:

<extension name='mcc' />
     <extension name='backoffice' />
     <extension name='commercesearchbackoffice' />

     <extension name='commerceservicesbackoffice' />
     <extension name='solrfacetsearchbackoffice' />

     <extension name='yacceleratorcockpits' />
     <extension name='yacceleratorinitialdata' />
     <extension name='yacceleratorfulfilmentprocess' />
     <extension name='yacceleratorstorefront' />
     <extension name='yaddon' />
     <extension name='ycommercewebservices' />

     <extension name="electronicsstore"/>
     <extension name="apparelstore"/>
     <extension name='solrserver' />
     <extension name='liveeditaddon' />
     <extension name='acceleratorwebservicesaddon' />

      <extension name='powertoolsstore' />
     <extension name='b2bcommercebackoffice' />
      <extension name='b2badmincockpit' />
     <extension name='b2bacceleratoraddon' />
     <extension name='commerceorgaddon' />

     <extension dir="C:\hybris-commerce-suites-5.7.0.3\hybris\bin/custom/yb2bacceleratorstorefront"/> 
4

3 回答 3

1

这是因为您的自定义文件夹中有新的自定义 yb2bacceleratorstorefront 扩展,并且由于您的 localextensions.xml 片段上方的行,这是自动加载的。

这个扩展然后试图参与到 modulegen 中,因为它包含相同的 modulegen 密钥,因为你只是从它生成的,但不再是你生成它的模板。

你应该先做模块生成。然后,根据需要生成任意数量的附加店面。但请记住,这些只是帮助你的工具,如果你想做更复杂的事情,你必须弄清楚如何做。

于 2015-12-15T00:52:08.630 回答
1

使用上述解决方案,您也可以解决这个问题。

您有一个自定义扩展 - yb2bacceleratorstorefront。请检查它extensioninfo.xml,你可能会在下面找到

meta key="modulegen-name" value="accelerator,b2baccelerator,chinaaccelerator"

评论这条线为我解决了这个问题。

于 2018-05-29T06:25:07.407 回答
0

我没有对此进行测试,但我怀疑这是一个路径问题。

<extension dir="C:\hybris-commerce-suites-5.7.0.3\hybris\bin/custom/yb2bacceleratorstorefront"/>

它存在吗?尝试按名称加载扩展 - 例如

<extension name="yb2bacceleratorstorefront"/>

如果这可行,那么它指出了基于目录加载扩展的问题(很可能是不正确的路径)。

于 2015-12-07T12:55:53.400 回答