AnsweredAssumed Answered

Execute command line with ProgramRunnable in FSR postCommit

Question asked by nicolasraoul on Dec 21, 2010
Latest reply on Jan 12, 2011 by nicolasraoul
I want to perform a task every WCM deployment. (final goal: upload the website via FTP)

So I installed and configured FSR (Alfresco-DeploymentEnterprise-3.3.2) and configured it to:
  • generate a "baked" version of the website to a given directory (it works)

  • execute a command line (it does not work).
Here is my postCommit (for now it just does "cp /etc/issue /tmp/fsrtest" which should work but no file found afterwards in /tmp):

<property name="postCommit">
                                        <list>
                                                <bean class="org.alfresco.deployment.SampleRunnable"/>
                                                <bean class="org.alfresco.deployment.ProgramRunnable">
                                                        <property name="program">
                                                                <value>/bin/cp</value>
                                                        </property>
                                                        <property name="directory">
                                                                <value>/tmp</value>
                                                        </property>
                                                        <property name="arguments">
                                                                <list>
                                                                        <value>/etc/issue</value>
                                                                        <value>/tmp/fsrtest</value>
                                                                </list>
                                                        </property>
                                                </bean>
                                        </list>
                                </property>

I wrote this property element at the root of DeploymentTargetRegistrationBean in deployment/default-target.xml in the FSR.
No error in nohup.out at startup nor at deployment.

What could be the problem in my postCommit configuration?
Thanks in advance!
Nicolas Raoul

Outcomes