From 4038cc9c452808392915c2913aca81e3540ca9d9 Mon Sep 17 00:00:00 2001 From: dkayiwa Date: Mon, 10 Feb 2020 15:41:17 +0300 Subject: [PATCH] Fixing NPE when installing OWAs - SDK-250 --- .../src/main/java/org/openmrs/maven/plugins/Setup.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/maven-plugin/src/main/java/org/openmrs/maven/plugins/Setup.java b/maven-plugin/src/main/java/org/openmrs/maven/plugins/Setup.java index 7cbdca88..d14147ab 100644 --- a/maven-plugin/src/main/java/org/openmrs/maven/plugins/Setup.java +++ b/maven-plugin/src/main/java/org/openmrs/maven/plugins/Setup.java @@ -283,9 +283,11 @@ public String setup(Server server, boolean isCreatePlatform, boolean isCopyDepen } private void installOWAs(Server server, DistroProperties distroProperties) throws MojoExecutionException { - File owasDir = new File(server.getServerDirectory(), "owa"); - owasDir.mkdirs(); - downloadOWAs(server.getServerDirectory(), distroProperties, owasDir); + if (distroProperties != null) { + File owasDir = new File(server.getServerDirectory(), "owa"); + owasDir.mkdirs(); + downloadOWAs(server.getServerDirectory(), distroProperties, owasDir); + } } private void downloadOWAs(File targetDirectory, DistroProperties distroProperties, File owasDir) throws MojoExecutionException {