Problem pulling nightly builds with ant "get" task, starting in about September/October 2011

Through August 2011 or so, we were able to use the “get” task in ant to do an http fetch of the latest JMonkey nightly build zip, as described at https://wiki.jmonkeyengine.org/legacy/doku.php/jme3_maven



Then the build zips stopped appearing for awhile during the beta release period, but now the nightly builds are back, and we want to start downloading those builds with ant again. But over a period of recent weeks, from multiple machines/locations with very ordinary direct internet access (no proxies, etc.), we are observing that ant get task is now reliably receiving a HTTP 403 “Forbidden” response. Direct access to the nightly builds from the browser works, as does “wget” from the command line, but apparently the “user-agent” header or some other aspect of Ant’s http-client is not getting along with the JMonkey web server (Apache?) hosting the zips in: http://jmonkeyengine.com/nightly/



We see:

[get] Getting: http://jmonkeyengine.com/nightly/jME3_2011-12-14.zip

[get] To: C:_root_xfermaven_tempjME3_nightly_build.zip

[get] Error opening connection java.io.IOException: Server returned HTTP response code: 403 for URL: http://jmonkeyengine.com/nightly/jME3_2011-12-14.zip



Using ant 1.8.1 with JDK 1.6.0.21 on Windows 7 (though I think colleagues have tried from Linux as well with same results, exact client platform is probably irrelevant). The line of ant script is below, where attribs can easily be replaced with hardcoded paths, and I am happy to provide a standalone ant unit test file if that is useful.







Regarding 403 errors from the JME platform, Normen mentioned the possibility of HttpClient rejection:

.

http://hub.jmonkeyengine.org/groups/jmonkeyplatform/forum/topic/trouble-updating-beta-and-beta-nightly/



I can write a script around wget if needed, but I thought it was worth asking if this is fixable on the server side (or with additional ant magic), since ant is widely used and the nightly builds are a key deliverable. Again, it used to work until September or so.

Change the url to http://direct.jmonkeyengine.com/

Boom! Early indications are that this works. Haven’t done a full download yet, but the 403 problem is gone. Thanks Normen! I will try to get this URL change propagated into other wiki pages, discussion topics, and such. Is there any “official” page explaining the difference between “direct.jmonkeyengine.com” and plain “jmonkeyengine.com” that I should refer others to? If not, that’s OK :wink: We just made one, right here!

The “normal” jmonkeyengine.com site is being protected (also against server downtime) using the CloudFlare service, it apparently also considers “plain” java applications (no special referrer) a threat and blocks them. Makes sense since I guess many bots are written in java.

OK, makes sense. Will try to share the info in such a way that those who need to know are informed, while evil bots are confounded. If U need to add password protection or change the “direct” host in the future, we are now forewarned and should be able to adjust. Thanks again!