AnsweredAssumed Answered

Deploy share-config-custom.xml via AMP in 5.0.c

Question asked by dsmith on Mar 23, 2015
Latest reply on Jun 10, 2015 by cupps101
I'm a bit of a greenhorn to customization but trying to follow along with the ecmarchitect.com tutorials while making accommodations for the differences since 4.x.

I'm developing using the all-in-one archetype of the 2.0 Alfresco SDK on a VM running Debian Jessie.
I have a working installation of Alfresco from the binary installer on the same VM to which I am attempting to apply the AMP files.

Have successfully created two simple content types: mcrd.doc (child of cm:content) and mcrd:will (child of mcrd:doc).  Packaged into AMP via mvn install and copied the resulting repo-amp.amp file to alfresco-5.0.c/amps.  Ran bin/apply_amps.sh which showed the amp being applied to alfresco.war.

I then created a share-config-custom.xml file in my-project-root/share-amp/src/main/resources/META-INF with the following content:


<alfresco-config>

   <!– Document Library config section –>
   <config evaluator="string-compare" condition="DocumentLibrary" replace="true" >

      <types>
         <type name="cm:content">
            <subtype name="mcrd:doc" />
            <subtype name="mcrd:will" />
         </type>

         <type name="mcrd:doc">
            <subtype name="mcrd:will" />
         </type>

      </types>

</alfresco-config>


Again I packaged them with mvn install and copied the share-amp.amp file to alfresco-5.0.c/amps_share.  Ran bin/apply_amps.sh, which showed the amp being applied to share.war.

However, when I start Alfresco and log in to Share, I can't see the custom content types listed when creating rules, or when changing existing content types.

If instead I edit the share_config_custom.xml file in the installed Alfresco instance (in tomcat/shared/classes/alfresco/web-extension), adding my custom types just as above, everything works fine.  New content types are visible and I can change existing content to those types and edit the custom metadata.  So I know my new content types were created successfully, but I'm doing something wrong when packing / applying the AMP to Share.

I've searched through the forums and found lots of posts related to share-config-custom.xml but haven't been able to figure out what I'm doing wrong - I'm sure it's terribly basic and any help would be appreciated.

Outcomes