From f9707ca71f160a72dafd11dacf8fdbe70c6e1e9e Mon Sep 17 00:00:00 2001 From: nravilla Date: Thu, 26 Sep 2024 11:46:33 -0400 Subject: [PATCH] Added extra condition get frontend files if its in distroProperties --- .../maven/plugins/utility/SpaInstaller.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/maven-plugin/src/main/java/org/openmrs/maven/plugins/utility/SpaInstaller.java b/maven-plugin/src/main/java/org/openmrs/maven/plugins/utility/SpaInstaller.java index 5ffaad8a..eb284a73 100644 --- a/maven-plugin/src/main/java/org/openmrs/maven/plugins/utility/SpaInstaller.java +++ b/maven-plugin/src/main/java/org/openmrs/maven/plugins/utility/SpaInstaller.java @@ -96,16 +96,14 @@ public void installFromDistroProperties(File appDataDir, DistroProperties distro // print frontend tool version number nodeHelper.runNpx(String.format("%s --version", program), legacyPeerDeps); - List configFiles = ContentHelper.collectFrontendConfigs(distroProperties); - - if (configFiles.isEmpty()) { - nodeHelper.runNpx( - String.format("%s assemble --target %s --mode config --config %s", program, buildTargetDir, spaConfigFile), legacyPeerDeps); - } else { - String assembleCommand = assembleWithFrontendConfig(program, buildTargetDir, configFiles, spaConfigFile); - nodeHelper.runNpx(assembleCommand, legacyPeerDeps); + if (distroProperties.getContentArtifacts().isEmpty()) { + nodeHelper.runNpx(String.format("%s assemble --target %s --mode config --config %s", program, buildTargetDir, + spaConfigFile), legacyPeerDeps); + } else { + List configFiles = ContentHelper.collectFrontendConfigs(distroProperties); + String assembleCommand = assembleWithFrontendConfig(program, buildTargetDir, configFiles, spaConfigFile); + nodeHelper.runNpx(assembleCommand, legacyPeerDeps); } - nodeHelper.runNpx( String.format("%s build --target %s --build-config %s", program, buildTargetDir, spaConfigFile), legacyPeerDeps);