Skip to content

Commit

Permalink
Merge pull request #913 from arunvenmany-ibm/multi_module_war_issue_fix
Browse files Browse the repository at this point in the history
gradle multimodule war webapp src directory missing in ear.xml fixed
  • Loading branch information
cherylking authored Oct 9, 2024
2 parents e5df873 + bbb8e7b commit 2906113
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 2906113

Please sign in to comment.