Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8547143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:12:10+00:00 2026-06-11T13:12:10+00:00

I have do the following using the Ant. I need to run the ant

  • 0

I have do the following using the Ant.
I need to run the ant script from machine A, the script has the details about the machine B like host name, username, pwd, directory to download, ftp details etc and When the script ran from machine A it should download the somefile using ftp in machine B.

I have given the details about the machine B in script, but when i ran the script it downloads the file in machine A instead of machine B. what i’m missing? or can some one help me with the code?

Thanks in advance.

Here is the code:

In maven i have defined the machine B details:

<host>MachineB</host>
<host.username>user</host.username>
<host.password>pwd</host.password>

In build.xml

<target name="Todownload_file" <mkdir dir="${download_dir}" />

    <ftp action="get" server="download_server_details" userid="user" password="pwd" remotedir="path">
        <fileset dir="${download_dir}">
            <include name="${file_name}"/>
        </fileset>
    </ftp>
</target>

As i said in the comments, there is no link between the machine b details and the ftp download section. Can anyone help on this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T13:12:11+00:00Added an answer on June 11, 2026 at 1:12 pm

    You can use sshexec task to run remote commands and you can use sep to copy/push files from/to machine B. There are a few ways you could do this conceptually.

    First approach:
    Download the file from the remote ftp site onto machine A then copy it to Machine B using the scp task. Finally run the file on machine B using sshexec.

    Second approach:
    Download the file directly onto Machine B by running the curl or ftp commands directly on Machine B from Machine A via sshexec. Then run another sshexec task to execute the file on Machine B.

    Third approach:
    Write a script (workflowscript.sh) that would work on Machine B (bash for Mac/Linux powershell/VBScript for Windows) and in this script you put the logic to perform the download of the other script via ftp or curl or whatever. Use scp on Machine A to copy workflowscriipt.sh to Machine B then use sshexec to execute it.

    In all above approaches you need to be aware of what runs where. Machine A just pushes files or sends remote commands to machine B and machine B does all the work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using apache ant in the following way: I have projects P1, P2,
I have the following problem: I'm using the wsimport ant task to create a
I am trying to run an Ant task from within IBM RSA IDE using
I need to generate an apk file using an Ant script, but I'm having
When I run ant debug from the command line, I get the following error
I have following code using hibernate to throw a custom exception on error and
Suppose I have the following: using(var ctx = DataContextFactory.Create(0)) { ... Some code ...
I have the following function using Excel 2010: Private Function MakeAllSheetsValuesOnly(targetBookName As String) If
I have the following code using actionscript and the indesign sdk: At the beginning
I have the following code: using System; using System.Diagnostics; using System.IO; using PdfSharp.Pdf.Printing; namespace

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.