Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Module 如何使用模块部署覆盖单个文件?_Module_Alfresco_Alfresco Share - Fatal编程技术网

Module 如何使用模块部署覆盖单个文件?

Module 如何使用模块部署覆盖单个文件?,module,alfresco,alfresco-share,Module,Alfresco,Alfresco Share,我使用的是alfresco sdk 2.0.0,它有alfresco共享版本5.1.e 这是我使用模块重写/替换OOTB文件的代码 <module> <id>Highlight Query Text</id> <auto-deploy>true</auto-deploy> <description>Highlight text in web previewer</description>

我使用的是alfresco sdk 2.0.0,它有alfresco共享版本5.1.e

这是我使用模块重写/替换OOTB文件的代码

  <module>
   <id>Highlight Query Text</id>
   <auto-deploy>true</auto-deploy>
   <description>Highlight text in web previewer</description>
   <version>1.0</version>
   <customizations>
     <customization>
       <targetPackageRoot>org.alfresco.components.preview</targetPackageRoot>
       <sourcePackageRoot>com.some.components.preview</sourcePackageRoot>
      </customization>
     </customizations>
  </module>

突出显示查询文本
真的
突出显示web预览器中的文本
1
org.alfresco.components.preview
com.some.components.preview
org.alfresco.components.preview

这将用站点webscripts/com/some/components/preview覆盖/替换站点webscripts/org/alfresco/components/preview文件夹


有没有办法只覆盖一个文件?例如:
\org\alfresco\components\preview\web preview.get.html.ftl
com\some\components\preview\web preview.get.html.ftl
只有位于
sourcePackageRoot
中的文件将覆盖默认文件,因此在您的情况下,只在
com\some\components\preview
包中添加你的
web preview.get.html.ftl

你是对的,但我不知道为什么如果我只添加这个文件web-preview.get.html.ftl,那么什么都不会得到反射,如果我添加了web-preview.get.config.xml和web-preview.get.js,那么它就可以完美地工作。