Alfresco自定义内容类型未显示

时间:2015-08-24 21:05:41

标签: maven alfresco m2eclipse alfresco-share

我一直在尝试按照本教程关于Alfresco自定义内容类型

http://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html#localizing-strings-for-custom-content-models

然而,当我进入“测试您的更改”步骤并且我去管理规则时,我无法设法在下拉列表中创建自定义类型(sc_doc和sc_whitepaper)。

我的share-config-custom.xml:

<!-- Share configuration related to this particular Share module extension, such as:
     - Doclib action config
     - Form config
     - Aspect and Type config

    Note. Any configuration related to the whole Share.war webapp
           (i.e. not specific to this share extension) should be
            placed in the environment specific config:
             alfresco/tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml file
     -->
<alfresco-config>
<!-- Document Library config section -->
 <config evaluator="string-compare" condition="DocumentLibrary">
  <aspects>
    <!-- Aspects that a user can see -->
        <visible>
          <aspect name="sc:webable" />
          <aspect name="sc:productRelated" />            
        </visible>
    <!-- Aspects that a user can add. Same as "visible" if left empty -->
        <addable>
        </addable>
    <!-- Aspects that a user can remove. Same as "visible" if left empty -->
        <removeable>
        </removeable>
  </aspects>
  </config>
  <config evaluator="node-type" condition="DocumentLibrary">
  <types>
    <type name="cm:content">
        <subtype name="sc:doc" />
        <subtype name="sc:whitepaper" />
    </type>
    <type name="sc:doc">
        <subtype name="sc:whitepaper" />
    </type>
  </types>
</config>    
</alfresco-config>

PS:在使用Eclipse在.xml中进行的每次更改后,是否必须重新运行'mvn install'?

非常感谢任何帮助!

2 个答案:

答案 0 :(得分:0)

我不确定您从maven工件创建了哪种项目。

  • 存储库AMP原型
  • 多功能一体机(AIO)原型
  • 分享AMP archetype

您可以在此处查看所有maven commands的列表。

如果您没有使用本地maven存储库,那么您可以使用“mvn package”生成新的AMP文件,然后在露天服务器上手动部署它们。

答案 1 :(得分:0)

我知道我迟到了这个答案 我的解决方案有点差,但它对我有用:) 我希望它对你也有用。
奇怪的是我正在遵循相同的教程,并且在“测试您的更改”阶段无法在服务器上看到我的自定义类型。

所以为了让它在我的分享项目中工作,我已经改变了  共享配置,custom.xml
src/main/resources/META-INFsrc/main/amp/config/alfresco/web-extension
并重新启动alfresco,现在可以在服务器上的类型列表中查看我的自定义类型 如果您通过任何其他方式完成此操作,请发布您的答案:) 谢谢。