}
public static void generate(final URL schema, final String targetPackage, final Map<String, Object> configValues, final File outputDirectory) {
try {
@SuppressWarnings("serial")
Jsonschema2PojoMojo pluginMojo = new TestableJsonschema2PojoMojo().configure(new HashMap<String, Object>() {
{
put("sourceDirectory", new File(schema.toURI()));
put("outputDirectory", outputDirectory);
put("project", getMockProject());
put("targetPackage", targetPackage);
putAll(configValues);
}
});
pluginMojo.execute();
} catch (URISyntaxException e) {
throw new RuntimeException(e);
} catch (MojoExecutionException e) {
throw new RuntimeException(e);
} catch (DependencyResolutionRequiredException e) {