1

I'm trying to deploy my JHipster app to Wildfly and am following the recommendation in this post :

How to add context file from Wildfly to JHipster

... for including jboss-web.xml and jboss-deployment-structure.xml in the WAR file. I've created a WEB-INF folder under src/main/webapp and placed the two config files there:

enter image description here

However when I run the command for generting the production WAR file using Gradle (./gradlew -Pprod bootRepackage), the WAR file contains neither jboss-web.xml or jboss-deployment-structure.xml in the WEB-INF folder. Do I need to modify build.gradle to ensure that it grabs the files I've placed in WEB-INF when generating the WAR file?

Community
  • 1
  • 1
6006604
  • 7,577
  • 1
  • 22
  • 30

1 Answers1

0

The Gradle war task needs to be told where the WEB-INF config files are located.

build.gradle:

war {
    webInf { from 'src/main/webapp/WEB-INF' }
}

See https://docs.gradle.org/current/userguide/war_plugin.html.

6006604
  • 7,577
  • 1
  • 22
  • 30