@Override
    public synchronized void execute() throws MojoExecutionException {
        // trigger initialization of the generator instance
        this.getGenerator();

        for (String className : Util.nullSafe(this.classNames)) {
            this.getLog().info("Generating JSON Schema for <className>" + className + "</className>");
            this.generateSchema(className, false);
        }
        for (String packageName : Util.nullSafe(this.packageNames)) {
            this.getLog().info("Generating JSON Schema for <packageName>" + packageName + "</packageName>");
            this.generateSchema(packageName, true);
        }
        if (Util.isNullOrEmpty(this.classNames) && Util.isNullOrEmpty(this.packageNames) && !Util.isNullOrEmpty(this.annotations)) {
            this.getLog().info("Generating JSON Schema for all annotated classes");
            this.generateSchema("**/*", false);
        }
    }
Invoke the schema generator.

@throws MojoExecutionException An exception in case of errors and unexpected behavior
jsonschema-maven-plugin/src/main/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojo.java