Skip to content

Commit 124cb3e

Browse files
committed
make sure target dir exists
1 parent 83b4d3d commit 124cb3e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/main/java/io/openapiprocessor/maven/ProcessMojo.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ public void execute () throws MojoExecutionException {
7272
log.info(String.format ("%10s - %s", "targetDir", joinDirs("${project.basedir}", relativeTargetDir)));
7373

7474
File targetRoot = new File(targetDir);
75+
makeDirs(targetRoot);
7576
UpToDateCheck upToDateCheck = new UpToDateCheck ();
7677
boolean upToDate = upToDateCheck.isUpToDate (source.getParentFile(), targetRoot);
7778

@@ -97,6 +98,11 @@ private String getProcessor () {
9798
return id;
9899
}
99100

101+
@SuppressWarnings("ResultOfMethodCallIgnored")
102+
private void makeDirs(File dir) {
103+
dir.mkdirs();
104+
}
105+
100106
private String stripBaseDir (String source) {
101107
Path base = Paths.get (project.getBasedir().getAbsolutePath ());
102108
Path src = Paths.get (source);

0 commit comments

Comments
 (0)