cancel
Showing results for 
Search instead for 
Did you mean: 

Amp for Share?

daltenho
Champ in-the-making
Champ in-the-making
Hi all,

I'm looking for a way to handle releases of the .ftl and .js files in Share. I thought about trying to use Amp files, but it appears that this is only available for the Alfresco.war, not Share.war. Does anyone know if this is the case? If so, how are other people handing releases? I'll be trying to incorporate Subversion somewhere in the process.

Thanks!
9 REPLIES 9

mikeh
Star Contributor
Star Contributor
You can use AMPs for Share - have a look at how we released the DoD 5015.2 Records Management module.

If you're on v3.3 you can also deploy JARs to Tomcat/shared/lib.

Thanks,
Mike

daltenho
Champ in-the-making
Champ in-the-making
Nice … I looked at the structure of the records management module, and used it as a template to create  our amp. Then installed it in share.war instead of alfresco.war. Needed to delete all of the expanded share files in tomcat before the changes took effect. Very sweet! It would be nice to include this is wiki documentation somewhere…

amitabhandari1
Champ in-the-making
Champ in-the-making
Hi MikeH,

Can you share with me how you are deploying amps in Alfresco share.

Thanks a lot.

mikeh
Star Contributor
Star Contributor
The exact same way they are deployed for the alfresco.war.

Thanks,
Mike

amitabhandari1
Champ in-the-making
Champ in-the-making
Hi MikeH,

I am applying apply_amps.bat file in alfresco 3.4.3 version but  using this I am able to apply AMP to alfresco war file  but not to share.
Below is the  content mentioned in apply_amps.bat file:

@echo off
rem ——-
rem Script for apply AMPs to installed WAR
rem ——-

set ALF_HOME=%~dp0
set CATALINA_HOME=%ALF_HOME%tomcat

if not exist "%ALF_HOME%SetPaths.bat" goto getpaths
call "%ALF_HOME%SetPaths.bat"
goto start

:getpaths
call "%ALF_HOME%bin\RegPaths.exe"
call "%ALF_HOME%SetPaths.bat"
del "%ALF_HOME%SetPaths.bat"

:start
echo This script will apply all the AMPs in %ALF_HOME%amps to the alfresco.war and share.war files in %CATALINA_HOME%\webapps
if ""%1"" == ""nowait"" goto nowait1
echo Press control-c to stop this script . . .
pause
:nowait1
"%JAVA_HOME%\bin\java" -jar "%ALF_HOME%bin\alfresco-mmt.jar" install "%ALF_HOME%amps" "%CATALINA_HOME%\webapps\alfresco.war" -directory "%2"
"%JAVA_HOME%\bin\java" -jar "%ALF_HOME%bin\alfresco-mmt.jar" list "%CATALINA_HOME%\webapps\alfresco.war"
"%JAVA_HOME%\bin\java" -jar "%ALF_HOME%bin\alfresco-mmt.jar" install "%ALF_HOME%amps-share" "%CATALINA_HOME%\webapps\share.war" -directory "%2"
"%JAVA_HOME%\bin\java" -jar "%ALF_HOME%bin\alfresco-mmt.jar" list "%CATALINA_HOME%\webapps\share.war"
echo .
echo About to clean out tomcat/webapps/alfresco directory and temporary files…
if ""%1"" == ""nowait"" goto nowait2
pause
:nowait2
rmdir /S /Q "%CATALINA_HOME%\webapps\alfresco"
rmdir /S /Q "%CATALINA_HOME%\webapps\share"
call "%ALF_HOME%bin\clean_tomcat.bat"


Appreciate your help.

Thanks,
Amita

amitabhandari1
Champ in-the-making
Champ in-the-making
Thanks MikeH ,

Its working now.  If you have applied AMPs for share project , can you share with me  file-mapping.properties .
Rightnow everything is going into tomcat/webapps/share/web-inf/classes/alfresco

Thanks,

mikeh
Star Contributor
Star Contributor
can you share with me  file-mapping.properties
This was taken from the dod-5015 module:
# Custom AMP to WAR location mappings

#
# The following property can be used to include the standard set of mappings.
# The contents of this file will override any defaults.  The default is
# 'true', i.e. the default mappings will be augmented or modified by values in
# this file.
#
include.default=false

#
# Custom mappings.  If 'include.default' is false, then this is the complete set.
#
/WEB-INF=/WEB-INF
/web=/

Thanks,
Mike

amitabhandari1
Champ in-the-making
Champ in-the-making
Mike,

This mapping doesn't work.
I have made the following mappings in file-mapping.properties but somehow the changes are not reflected and everything goes into tomcat/webapps/share/WEB-INF/classes/alfresco/extension.


include.default=true
/config=/WEB-INF/classes/alfresco/extension
/web/components=/componenets
/web/modules=/modules
/lib=/WEB-INF/lib
#
# Custom mappings.  If 'include.default' is false, then this is the complete set.
#

Let me know your response to it.

Thanks,

mikeh
Star Contributor
Star Contributor
Yes it does work.  :wink:

Actually, I see you have resolved your issue here: http://forums.alfresco.com/en/viewtopic.php?f=47&t=41003

Please mark both topics as solved.

Thanks,
Mike