diff --git a/jsonschema-maven-plugin/src/main/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojo.java b/jsonschema-maven-plugin/src/main/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojo.java index 158141c7..17f3d5c8 100644 --- a/jsonschema-maven-plugin/src/main/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojo.java +++ b/jsonschema-maven-plugin/src/main/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojo.java @@ -240,6 +240,19 @@ private void generateSchema(String classOrPackageName, boolean targetPackage) th } } + /** + * Generate the JSON schema for the given className. + * + * @param schemaClass The class for which the schema is to be generated + * @throws MojoExecutionException In case of problems + */ + private void generateSchema(Class schemaClass) throws MojoExecutionException { + JsonNode jsonSchema = getGenerator().generateSchema(schemaClass); + File file = getSchemaFile(schemaClass); + this.getLog().info("- Writing schema to file: " + file); + this.writeToFile(jsonSchema, file); + } + private void logForNoClassesMatchingFilter(String classOrPackageName) throws MojoExecutionException { StringBuilder message = new StringBuilder("No matching class found for \"") .append(classOrPackageName) @@ -254,19 +267,6 @@ private void logForNoClassesMatchingFilter(String classOrPackageName) throws Moj this.getLog().warn(message.toString()); } - /** - * Generate the JSON schema for the given className. - * - * @param schemaClass The class for which the schema is to be generated - * @throws MojoExecutionException In case of problems - */ - private void generateSchema(Class schemaClass) throws MojoExecutionException { - JsonNode jsonSchema = getGenerator().generateSchema(schemaClass); - File file = getSchemaFile(schemaClass); - this.getLog().info("- Writing schema to file: " + file); - this.writeToFile(jsonSchema, file); - } - /** * Get all the names of classes on the classpath. *