Since you can consider your own tasks, I assume that you are trying to use the run
task. It took a little digging, but I finally earned it; in a nutshell, this is what you are doing (assuming your task is called deployTask
, set up according to your needs):
deployTask <<= ( fullClasspath in Compile, runner ) map { ( classpath, runner ) => val logger = ConsoleLogger() // Not sure this is optimal Run.executeTrapExit( { Run.run( "com.sample.MainClass", classpath map { _.data }, Seq( "option1", "option2", "..." ), // <-- Options go here logger )( runner ) }, logger ) }
This does not directly InputTask
(I have not yet found a way to do this), but it at least allows you to run arbitrary Java code.
source share