Conversion to WAR
SeedStack projects created by the generate goal of the SeedStack Maven plugin are
designed to be run from command-line with an embedded Web server. You can convert this kind of project to a classic WAR.
- Add a
src/main/webapp
folder to hold the document root.
- Add a
<packaging>war</packaging>
tag to the pom.xml
.
- Remove the
build-capsule
plugin execution (package
goal of seedstack-maven-plugin
) as this only works with
standalone JAR files.
- Configure the
maven-war-plugin
to ignore the absence of the web.xml
file:
| <build> |
| <pluginManagement> |
| <plugins> |
| <plugin> |
| <groupId>org.apache.maven.plugins</groupId> |
| <artifactId>maven-war-plugin</artifactId> |
| <configuration> |
| <failOnMissingWebXml>false</failOnMissingWebXml> |
| </configuration> |
| </plugin> |
| </plugins> |
| </pluginManagement> |
| </build> |
- Remove the embedded Web server from project dependencies:
| <dependency> |
| <groupId>org.seedstack.seed</groupId> |
| <artifactId>seed-web-undertow</artifactId> |
| </dependency> |