Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Releasing to production systems using maven-generated WAR file
I'm using Vaadin 8.7.2 (upgraded from Vaadin 7 using Ivy) and 'maven clean package' creates a WAR file. Previously, we just created a JAR of our code (now there's no JAR, all the .class files are just in the WEB-INF/classes folder).
For deployments across various systems, we could just release our JAR file (along with any other updated JARs). Our JAR file also had the name format like openesignforms-19.3.23.jar which we could use to determine the release version (19.3.23 in this example). Now that seems like we'd have to instead check the WAR file name as it has the release version in it's name.
That said, how do people release WAR files for Tomcat deployments? The biggest issue is that we have a few files that we allow the end user to customize. Can we ship a WAR file with those 'test/dev' versions of those files inside and also set overriding files in Tomcat's area for deployment? That is, one such file is from webapp/motd.html that allows them to set a message to be shown on the login page. The other are some WEB-INF/classes/config.properties files that specify fully customized things like the database location and credentials, where log files go, and some deployment-specific settings. Another typically customized file is WEB-INF/web.xml since we manage lots of webapps on a given Tomcat server. We'd want these files to override those in the WAR file so that users can customize them for their needs.
Again, when we shipped JARs, those files were not a concern as they were not packaged in our release code. But the WAR is its own release format. I'm just curious if others have resolved this or know how it works.
Can we just create a Tomcat folder like webapps/demo for our 'demo' webapp and put the WAR there (in webapps/demo/myproject-19.3.23.war) and also set files like webapps/demo/motd.html and webapps/demo/WEB-INF/web.xml and webapps/demo/WEB-INF/classes/config.properties, etc....?