in netbeans.apache.org/buildSrc/src/main/groovy/TomcatMain.groovy [42:49]
public static void main(String[] args) {
final TomcatMain tc = new TomcatMain()
tc.directory = new File(args[0])
tc.port = Integer.parseInt(args[1])
tc.shutdownCommand = args[2]
tc.shutdownPort = Integer.parseInt(args[3])
tc.run()
}