Modified files not being sent during ANT build

user10597469 :

We have been using Eclipse as our default IDE for some time and it has been a consistent source of headache, but moving away from it hasn't been an option because our build process is inexorably tied to it. I recently set us up to be able to build from VSCode. The problem is, that the build works for every computer except for mine and I can't for the life of me figure out why. When run from my computer, and only my computer, files that have been modified will fail to be detected during the build. What is even stranger is that, when Passive FTP is set to "yes", the files are simply ignored, as if they haven't been modified at all. When it is set to "no", however, I get this error:

SendPrivateMCS:
  [ftp] sending files
  [ftp] transferring C:\...\newtest.cfm

BUILD FAILED
C:\...\build.xml:1262: could not put file: 500 Illegal PORT command.

I get why I am getting this error. I am trying to send to a server configured for passive FTP. That's not a mystery. What is odd is that when active FTP is used, the test file that I modified is detected and an attempt is made to send it to the server, but when passive is used, it ignores it all together:

SendPrivateMCS:
  [ftp] sending files
  [ftp] 0 files sent
  [ftp] sending files
  [ftp] 0 files sent
  [ftp] sending files
  [ftp] 0 files sent
  [ftp] sending files
  [ftp] 0 files sent

Again, this only happens on my computer. The other devs are building just fine, in precisely the same way I am, and having no problems, which leads me to believe this is a problem with Java, Ant, or some sort of local FTP settings I'm not aware of but can't really figure out where to even begin looking. The build.xml file is the same one we have been using forever and hasn't been modified. I have tried reinstalling Java, reinstalling ANT, altering my environment variables, and looking for improperly uninstalled/deleted files and so far nothing has worked. I know all I have provided is some stack traces but there isn't really any code associated with this. I am just trying to run and ANT build from Powershell (ant Deploy -DDeployserver=foo) using a proven build.xml that has been in use here for at least half a decade. For some reason, it only sees my files when I use active FTP and can't seem to find any resources to help me figure out a possible cause. Any suggestions?

user10597469 :

Ok, so I'm posting an answer to my own question because I finally came back to this project and we figured out the issue...sort of. Our server time is 6 hours ahead of my local time and the build file, for some reason, wasn't sure which time to use. I'm not sure why this happened, as it worked unmodified for everyone else and I verified that they were all seeing the same datetime entries I was, however, casting the server time zone explicitly for each ftp call did the trick for me and didn't break anything for them, so now we have a universal VSCode build that works for everybody. I'd still be interested if anyone has any information on why this worked at all. Since modifying the code wasn't necessary for anyone else to run this, I assumed that the problem must be with system settings, rather than the code, but the problem ended up being fixed by modifying the build.xml. The problem is fixed but I still have no idea why it didn't work in the first place or why the fix did work and would love it if anyone had clarification on that, but the issue is technically fixed and if anyone else has this problem, at least this is something you can try.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=109402&siteId=1