From bbb8e7babf08ebd36392ec31f684c4f2afee7cea Mon Sep 17 00:00:00 2001 From: Arun Venmany Date: Tue, 8 Oct 2024 20:09:36 +0530 Subject: [PATCH] gradle multimodule war webapp src directory missing in ear.xml fixed Signed-off-by: Arun Venmany --- .../openliberty/tools/gradle/utils/LooseEarApplication.groovy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/groovy/io/openliberty/tools/gradle/utils/LooseEarApplication.groovy b/src/main/groovy/io/openliberty/tools/gradle/utils/LooseEarApplication.groovy index 01073ae8..99bf2b5b 100644 --- a/src/main/groovy/io/openliberty/tools/gradle/utils/LooseEarApplication.groovy +++ b/src/main/groovy/io/openliberty/tools/gradle/utils/LooseEarApplication.groovy @@ -49,6 +49,10 @@ public class LooseEarApplication extends LooseApplication { public Element addWarModule(Project proj) throws Exception { Element warArchive = config.addArchive("/" + proj.war.getArchiveFileName().get()); + if (proj.war.getWebAppDirectory().getAsFile().get() != null) { + var sourceDir = new File(proj.war.getWebAppDirectory().getAsFile().get().getAbsolutePath()) + config.addDir(warArchive,sourceDir,"/") + } proj.sourceSets.main.getOutput().getClassesDirs().each{config.addDir(warArchive, it, "/WEB-INF/classes");} addModules(warArchive,proj) return warArchive;