cancel
Showing results for 
Search instead for 
Did you mean: 

Share configuration with Maven

sihnu
Champ in-the-making
Champ in-the-making
Hi,

I've been figuring out how to use maven & amp for development. Finally, I was able to register a custom model with amp & module management tool. Next thing is to customize share to show the customized model type in UI but it's causing problems. I've created SHARE extension module with maven archetype and I can see share-config-custom.xml file in the module but how should I deploy the changes? Module package is defined as WAR in pom.xml. I've tried to change it to jar and drop it into tomcat/share/lib but changes won't come in place.How should I deploy the module? Also is there a possibility to do share extension using amp file? If so where should I place share-config-custom.xml so that it would be read by Alfresco? I would rather use amp for share customization as well.

Thanks in Advance, Sihnu
1 REPLY 1

sihnu
Champ in-the-making
Champ in-the-making
I think I've made some progress. I added this as a new bean to load my share-config-custom.xml:


<bean id="my.custom.config" class="org.springframework.extensions.config.ConfigBootstrap"
      init-method="register">
      <property name="configService" ref="web.config" />
      <property name="configs">
         <list>
            <value>classpath:alfresco/module/sample-amp-module/share-config-custom.xml</value>
         </list>
      </property>
   </bean>


I think the share-config-custom is now read but it throws error:

"Failure to load model object for path: content-associations/.keepme

Caused by: org.dom4j.DocumentException: Error on line 1 of document  : Premature end of file. Nested exception: Premature end of file."

And the content in share-config-custom:

<alfresco-config>

   <!– Document Library config section –>
   <config evaluator="string-compare" condition="DocumentLibrary">
      <types>
         <type name="cm:content">
            <subtype name="my:sop" />
         </type>

         <type name="cm:folder">
         </type>
      </types>
   </config>
</alfresco-config>