diff --git a/jsonschema2pojo-maven-plugin/src/main/java/org/jsonschema2pojo/maven/Jsonschema2PojoMojo.java b/jsonschema2pojo-maven-plugin/src/main/java/org/jsonschema2pojo/maven/Jsonschema2PojoMojo.java index cc428b570..851d679d9 100644 --- a/jsonschema2pojo-maven-plugin/src/main/java/org/jsonschema2pojo/maven/Jsonschema2PojoMojo.java +++ b/jsonschema2pojo-maven-plugin/src/main/java/org/jsonschema2pojo/maven/Jsonschema2PojoMojo.java @@ -366,6 +366,8 @@ public class Jsonschema2PojoMojo extends AbstractMojo implements GenerationConfi "NP_UNWRITTEN_FIELD", "UWF_UNWRITTEN_FIELD" }, justification = "Private fields set by Maven.") public void execute() throws MojoExecutionException { + addProjectDependenciesToClasspath(); + try { getAnnotationStyle(); } catch (IllegalArgumentException e) { @@ -399,8 +401,6 @@ public void execute() throws MojoExecutionException { project.addCompileSourceRoot(outputDirectory.getPath()); } - addProjectDependenciesToClasspath(); - try { Jsonschema2Pojo.generate(this); } catch (IOException e) {