How to copy files from a Unix share to a Windows machine using ant? How to copy files from a Unix share to a Windows machine using ant? unix unix

How to copy files from a Unix share to a Windows machine using ant?


Can't seem to figure out what the difference is. cmd.exe must be executed as some other user?

100%. Not only the user different, but so is the %PATH%, and any credentials you may have cached. Additionally, your ant executable is different too. Running from cmd you have whatever copes from %PATH%. Running through Jenkins, uses one of Jenkins' installations. However this wasn't the question here.

The Jenkins user depends on how you have it setup. If a Windows service, manage the user through Windows Services dialog, change it from "Local System" to something you are more familiar with, such as your own user.

Several things to check for first.

  • Can you even ping the host, through Jenkins.
    Configure an "Execute Batch Command" step, and just type ping srv-linuxdev. Execute through Jenkins. See if that works.

  • Can you still copy the file if you omit the available tag altogether?

  • How are the permissions setup to access the linux share? Is it 100% open? For which user? I don't see any credentials being passed in your case. Are the credentials cached on your user session? This all ties to Jenkins running as different user.