This should help anybody create new Java Meterpreter Extensions and
configuring the build system to properly build, test and deploy them.
The generated sample extension already contains two simple commands, to
serve as a base for more complex commands.
Move source code of all Meterpreter extensions to a common target
directory during build, so that tests that apply to all extensions won't
need to be updated when a new extension is added.
Use this to apply the version compatibility checks to all extensions.
As this repo it is no longer in external/source directory, the deploy
targets need to know where the Framework repository is. This defaults to
../metasploit-framework, but can be changed via -D deploy.path= command
line switch.
Apparently, getNetworkPrefixLength can return -1, which confuses the Ruby
side. Therefore fall back to guessing the prefix in this case, as we do it
for Java <= 1.6.