Skip to content

Commit

Permalink
Issue #5480 - Fail in jetty-maven-plugin if unable to create temp dir…
Browse files Browse the repository at this point in the history
…ectory.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Oct 20, 2020
1 parent 0e98c37 commit 227dd47
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -49,7 +49,6 @@
import org.eclipse.jetty.server.handler.ContextHandler;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.server.handler.HandlerCollection;
import org.eclipse.jetty.util.PathWatcher;
import org.eclipse.jetty.util.Scanner;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.resource.Resource;
Expand Down Expand Up @@ -559,7 +558,12 @@ public void configureWebApplication() throws Exception
File target = new File(project.getBuild().getDirectory());
File tmp = new File(target, "tmp");
if (!tmp.exists())
tmp.mkdirs();
{
if (!tmp.mkdirs())
{
throw new MojoFailureException("Unable to create temp directory: " + tmp);
}
}
webApp.setTempDirectory(tmp);
}

Expand Down

0 comments on commit 227dd47

Please sign in to comment.