in function-maven-plugin/src/main/java/com/google/cloud/functions/plugin/RunFunction.java [65:82]
public void execute() throws MojoExecutionException {
String classpath = String.join(File.pathSeparator, runtimePath);
List<String> args = new ArrayList<>();
args.addAll(Arrays.asList("--classpath", classpath));
if (functionTarget != null) {
args.addAll(Arrays.asList("--target", functionTarget));
}
if (port != null) {
args.addAll(Arrays.asList("--port", String.valueOf(port)));
}
try {
getLog().info("Calling Invoker with " + args);
Invoker.main(args.toArray(new String[0]));
} catch (Exception e) {
getLog().error("Could not invoke function: " + e, e);
throw new MojoExecutionException("Could not invoke function", e);
}
}