cancel
Showing results for 
Search instead for 
Did you mean: 

How to customise share-config-custom.xml from a module?

mxc
Confirmed Champ
Confirmed Champ
Hi all,

I would like to wrap some of our customisations to share up into an amp file. How does one deploy customisations to share-config-custom.xml?

thanks
5 REPLIES 5

mxc
Confirmed Champ
Confirmed Champ
Thanks Mits for the link. I know how to include the js, css, freemarker and other files. I was wondering how one can add the customisations to share-config.xml or share-config-custom.xml to the project. I am hoping there is a way similar to how spring framework application context files are picked up based on naming conventions like context.xml. I think this might be a surf thing since I assume share-config-custom.xml is a surf specific config file. All the tutorials I read just say to make changes to the custom file. But how does one make this portable in a module?

If the link does explain this I couldn't find it covered in the post. But it might be my mistake.

boumbh
Champ in-the-making
Champ in-the-making
If you just want to include <em>share-config-custom.xml</em> in a AMP file, you can try and get it to:

<strong>share.war!/WEB-INF/classes/alfresco/web-extension/share-config-custom.xml</strong>

So it should appear in the AMP:

<strong>my-project.amp!/config/alfresco/web-extension/share-config-custom.xml</strong>

If you are using (for instance) Maven with the archetype <em>org.alfresco.maven.archetype:alfresco-amp-archetype:1.1.1</em>, it should be there in the project:

<strong>my-project:/config/alfresco/web-extension/share-config-custom.xml</strong>

But you could also wrap it further into the embedded JAR like this (sometime useful <a>http://stackoverflow.com/questions/22098191/what-is-the-difference-in-packaging-alfresco-extension-a...</a>, <a>http://josh-barrett.blogspot.fr/2012/10/amps-vs-jars-for-alfresco-customizations_3605.html</a>):

<strong>my-projet.amp!/lib/my-project.jar!/META-INF/share-config-custom.xml</strong>

In this case, you would need to put it inside the <em>resources</em> folder of your project:

<strong>my-project:/src/main/resources/META-INF/share-config-custom.xml</strong>

If I posted something wrong please react.

Me, I’m searching for a way to get the <em>share-config-custom.xml</em> inside the module (so I could enable or disable it from the Share interface <a>http://localhost:8080/share/page/modules/deploy</a>). I think I may give up without knowing if it’s actually possible.

dhartford
Champ on-the-rise
Champ on-the-rise
Just want to ask / note an issue I ran into:  If you try to setup system level features, such as CSRFPolicy via a tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml  but there is an amp that also has share-config-custom.xml file, the AMP will take precedence and the /shared/ version will *not* get loaded.

This introduces some problems for at least me, where I want system administrators the ability to adjust configurations around reverse proxy setups, but still want developers to create extensions for things like search form definitions for custom content models.

Thoughts / ideas?
-D

dmolina
Champ in-the-making
Champ in-the-making
I have a similar problem. I set up a Kerberos configuration via tomcat/shared/classes/alfresco/web-extension/share-config-custom.xml, but external suppliers deploy AMP with definitions for custom models that override a shared share-config-custom.xml file and break Kerberos feature.

Have you found a best practice to avoid this problem?

Thanks