[Anthill-pro] RE: FTP Step
Eric Minick
etm at urbancode.com
Tue Feb 9 10:13:18 CST 2010
Sounds good. I would say that the argument if favor of the plugin system is
that you could bundle the required extra libraries in plugin which would
leave the projects un-tampered with and make sure the libraries were in a
known place on every system.
-- Eric
On Tue, Feb 9, 2010 at 8:59 AM, <Brian_Kelly at timeinc.com> wrote:
> Thanks for the reply, Eric.
>
> I hadn't even considered option 1, but in bringing it up to the team
> involved they started questioning why we were using FTP instead of SCP.
> So we're going to switch to SCP which makes it possible to use the
> command-line to recursively copy a directory from one machine to
> another.
>
> Option 3 is something we still might try for some other situations
> though.
>
> -brian
>
> -----Original Message-----
> From: anthill-pro-bounces at lists.urbancode.com
> [mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of Anderson,
> Eric
> Sent: Monday, February 08, 2010 2:38 PM
> To: anthill-pro at lists.urbancode.com
> Subject: [Anthill-pro] RE: FTP Step
>
> Brian,
>
> Well, here's a few ideas - I've sorted them in order of general
> desirability.
>
> 1. Unless there's some organizational constraint that requires the use
> of FTP, then why not just install an AHP agent on the server that needs
> the documentation and then resolve the documentation from codestation to
> that server?
>
> 2. There are other ways to do this from a shell builder step that are
> easier, such as using ncftp's command line tools (which are also free).
> I mention them because they are really designed for command-line use and
> I've had good luck with them in the past. It's also free, and you would
> just need to include a -R to do recursive mode.
>
> http://www.ncftp.com/ncftp/doc/ncftpput.html
>
> 3. If you really want to use Ant to do this, then there is really no
> reason you have to do that through a plug-in. In fact, it would be
> easier to do with the Ant builder step. As for making sure you have Ant
> and any required dependencies, they can be included in other AHP
> projects and then included as dependencies. A resolve dependency
> artifacts step would then be sufficient to ensure that you had all of
> your dependencies. They only requirement on the projects would be to
> make sure that their AnthillPro projects have the dependencies
> configured on them, as opposed to the individual projects each having to
> package up the JARs themselves.
>
> Thanks,
> Eric
>
> -----Original Message-----
> From: anthill-pro-bounces at lists.urbancode.com
> [mailto:anthill-pro-bounces at lists.urbancode.com] On Behalf Of
> Brian_Kelly at timeinc.com
> Sent: Monday, February 08, 2010 1:21 PM
> To: anthill-pro at lists.urbancode.com
> Subject: [Anthill-pro] FTP Step
>
> Hi all,
>
> One of our projects would like the ability to FTP documentation to a
> particular server based on the environment we're deploying to. The
> destination can easily be set via Project Environment Properties, but
> I'm trying to sort out the best way to actually implement the step.
>
> Since I need to recursively upload a set of files and folders I can't
> use a simple command-line call to an "ftp" command.
>
> I then wrote a little Ant script to do the task but realized I'd need to
> package up the Commons Net JARs that are required by the option FTP task
> for Ant. I don't want projects to have to package up JARs in a project
> just to appease a step in an AHP job. I could maybe use a deploy-time
> dependency but that could get messy. So I started looking at writing a
> plugin.
>
> My first stab was using Groovy but after seeing that the Ant FTP task
> just requires a source directory, I didn't want to do all the heavy
> lifting in Groovy to recursively upload files and use file streams using
> commons.net.ftp.FTPClient. Yuck!
>
> So then I decided to see if I could just call an Ant script from a
> plugin and use the ftp task and package up the required JARs with the
> plugin. Unfortunately it's complaining that it can't find build.xml
> because the script is passed as an argument but without the necessary -f
> for Ant. I tried naming my file buid.xml but it still can't manage to
> find it. And adding -f to the <interpreter> element results in an error
> trying to find a file called "ant-f"
>
> Any suggestions or alternate ideas?
>
> -brian
>
> PS - This was the Groovy FTP script I found to work off of:
> http://www.hhhhq.org/blog/2009/05/01/ftp-using-groovy-and-ant/
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>
More information about the Anthill-pro
mailing list