scalatron/scalatron — pull request #69 by verhoevenv (2014-11-21 23:11:21+00:00)
Title: Fix publishing on Windows host

This fixes issue #48, as well as some other necessities to get Scalatron building on Windows with IntelliJ (for example pull request #67).

The server will now not try to delete running plugin bots, because that will fail under Windows. Instead, all versions are kept, and the newest plugin is loaded each round. No attempt is made to unload or remove previous versions.

I know of at least two issues with this fix:
1. It might not be a good idea in an untrusted environment, because a user could keep publishing to try and exhaust memory or disk space of the host.
2. The cleanup part of the tests (ScalatronApiSpec.scala) has the same issue and also couldn't be deleted, causing tests to fail. This was solved by simply disabling cleanup.

The road not traveled:
To solve these issues, you'd have to be able to close the plugin jars file handles at runtime. This might be doable with URLClassLoader.close at the right time, but that is way too fiddly for my little brain.