Automatically deploy jars with dependencies and set the main class