Skip to content

Commit

Permalink
gradle multimodule war webapp src directory missing in ear.xml fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Arun Venmany <[email protected]>
  • Loading branch information
arunvenmany-ibm committed Oct 8, 2024
1 parent ab5ea67 commit bbb8e7b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit bbb8e7b

Please sign in to comment.