Module 如何使用模块部署覆盖单个文件?
我使用的是alfresco sdk 2.0.0,它有alfresco共享版本5.1.e 这是我使用模块重写/替换OOTB文件的代码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>
<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,那么它就可以完美地工作。