cancel
Showing results for 
Search instead for 
Did you mean: 

external script in amp

abruzzi
Champ on-the-rise
Champ on-the-rise
I'm trying to package some work into an amp.  The work currently uses "org.alfresco.util.exec.RuntimeExec" to run an external script.  Ideally I'd like to package the script in the amp itself.  Which leads to two questions:

1. Where in the amp is a good place to put the script?

2. Since I don't know where the war will be installed, I would need to provide a relative path (but relative to where?) or some sort of property value that will know the absolute location of the war.  Is this possible?



                <property name="commandsAndArguments">
                    <map>
                        <entry key="*">
                            <list>
                                <value>sh</value>
                                <value>-c</value>
                                <value>/some/file/location/scriptname.sh '${source}' '${target}' OCRtoPDF</value>
                            </list>
                        </entry>
                    </map>
                </property>


Geof
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator
Checkout how paths are givne in service-context.xml
there are few properties defined in property file like "archtypid" which you can use to give relative path. I do not remember exact name of those properties but if you refer property file within that amp structure you will be able to find it.