Embed within your own java code
StreamsPigGenerationConfig config = new StreamsPigGenerationConfig();
config.setSourceDirectory("src/main/jsonschema");
config.setTargetDirectory("target/generated-resources");
StreamsPigResourceGenerator generator = new StreamsPigResourceGenerator(config);
generator.run();