From c5e8d41c9b247a3fd209a6ddb045f89fcb580ffc Mon Sep 17 00:00:00 2001 From: nravilla Date: Sun, 22 Sep 2024 23:39:29 -0400 Subject: [PATCH] Changes based on PR code review --- .../java/org/openmrs/maven/plugins/BuildDistro.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/maven-plugin/src/main/java/org/openmrs/maven/plugins/BuildDistro.java b/maven-plugin/src/main/java/org/openmrs/maven/plugins/BuildDistro.java index bed57cd6..49c3ef02 100644 --- a/maven-plugin/src/main/java/org/openmrs/maven/plugins/BuildDistro.java +++ b/maven-plugin/src/main/java/org/openmrs/maven/plugins/BuildDistro.java @@ -294,9 +294,8 @@ private String buildDistro(File targetDirectory, Artifact distroArtifact, Distro File owasDir = new File(tempDir, "bundledOwas"); owasDir.mkdir(); - downloadOWAs(targetDirectory, distroProperties, owasDir); - //downloadAndMoveContentBackendConfig(targetDirectory, distroProperties); - spaInstaller.installFromDistroProperties(tempDir, distroProperties, ignorePeerDependencies, overrideReuseNodeCache); + downloadOWAs(targetDirectory, distroProperties, owasDir); + spaInstaller.installFromDistroProperties(tempDir, distroProperties, ignorePeerDependencies, overrideReuseNodeCache); File frontendDir = new File(tempDir, "frontend"); if(frontendDir.exists()) { frontendDir.renameTo(new File(tempDir, "bundledFrontend")); @@ -304,7 +303,6 @@ private String buildDistro(File targetDirectory, Artifact distroArtifact, Distro warfile.addFolder(tempDir, new ZipParameters()); try { - //ContentHelper.deleteTempContentFolder(targetDirectory); FileUtils.deleteDirectory(tempDir); } catch (IOException e) { @@ -325,7 +323,7 @@ private String buildDistro(File targetDirectory, Artifact distroArtifact, Distro File configDir = new File(web, SDKConstants.OPENMRS_SERVER_CONFIGURATION); configDir.mkdir(); - setConfigFolder(configDir, distroProperties, distroArtifact); + setConfigFolder(configDir, distroProperties, distroArtifact); ContentHelper.downloadAndMoveContentBackendConfig(web, distroProperties, moduleInstaller, wizard); spaInstaller.installFromDistroProperties(web, distroProperties, ignorePeerDependencies, overrideReuseNodeCache); @@ -621,5 +619,6 @@ public boolean accept(File dir, String name) { throw new MojoExecutionException("Distro should contain only single war file"); } } - } + } + }