cancel
Showing results for 
Search instead for 
Did you mean: 

Copy content to FTP automatically at deployment

nicolasraoul
Star Contributor
Star Contributor
Hello all!
I just wrote this blog post explaining how to configure Alfresco WCM so that when clicking "Deploy", all modified web content is sent to an FTP server (for instance the server that hosts your website).
Feedback is welcome! Especially if you know better ways to do things.
And Happy New Year 2011!
Nicolas Raoul
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Could you contribute your error handling changes please.

nicolasraoul
Star Contributor
Star Contributor
Calling it "error handling" would be presumptuous, I just dump everything to the standard output.
But at least it might be better than silently ignoring any error.

As linked in my blog post, the modified source code is here:
https://github.com/nicolas-raoul/Nicolas-Raoul-Blog/raw/master/2011-01-12/ProgramRunnable.java
It is just the "System.out.println(line);" in the last method.
It gets written in nohup.out, which is kind of AlfrescoDeployment's log.

Another small thing I fixed is the extension for the temp file, it was creating "deployment732654325txt" files where "deployment732654325.txt" was probably intended. The previous code was probably due to the File.createTempFile method's questionable habit of not including the "." character. Not that anybody cares about extensions of temp files, though…

Cheers!
Nicolas Raoul