7 min read
The Art of .WAR
Java developers can rejoice today! We are releasing a new way to deploy web applications packaged as .WAR archives, as simple as the one-liner “scalingo deploy project.war”. Build them with your continuous integration solution or directly on your workstation and deploy them directly to Scalingo. Releasing a WAR has nev

Java developers can rejoice today! We are releasing a new way to deploy web applications packaged as .WAR archives, as simple as the one-liner "scalingo deploy project.war". Build them with your continuous integration solution or directly on your workstation and deploy them directly to Scalingo. Releasing a WAR has never been so easy and fast.
So far our only method to start an application deployment was to use git push or the GitHub integration provided by the platform. In both cases the deployment is working the same way: the language is detected, dependencies are installed and potentially, the code is compiled. In some ecosystem, this method is not always the best one. That's why we're proposing today to the Java developers to deploy their WAR archives directly.
Direct WAR archive deployment
WAR (Web application ARchive) are special zip archives containing a built java project with its dependencies required to run a webservice over an application server like Tomcat. They are designed to be distributed directly to hosting platforms as a standalone package to run a web application.
Once the developer or the continuous integration platform has generated this file, there is no need to compile the source code again, it is already ready to run. To avoid doing this unnecessary step and to fasten the deployment of java applications producing WAR files, we're introducing a new command in our Command Line Interface.
Usage
Designed over our API
The feature has been designed thanks to our Developers API, That means there is no magic, our CLI is open source and you can integrate this kind of feature pretty easily in your own tools and scripts.
Configuration
You may want to customize the version of the JVM deployed with your WAR or the version of webapp-runner (including Tomcat).
JVM version selection
The Java version you're using can be defined in the JAVA_VERSION environment variable:
If nothing is defined, Java 8 will be installed alongside your .WAR.
Webapp Runner / Tomcat version selection
By default, Tomcat 8.5 is installed with the last version of the webapp-runner, if you want to use another version, you can defined the environment variable WEBAPP_RUNNER_VERSION. You can find all the available versions here.
The 8.0.x versions are installing Tomcat 8, and the 8.5.x releases are installing Tomcat 8.5:
Future
While WAR archives are now directly deployable, you can still deploy your Java/Scala/Play app by pushing your code and using Maven or Gradle. If you are used to deploy self-sufficient JAR archives while using Spring Boot or Jetty, the feature is also coming, stay tuned.

Étienne Michon
Étienne Michon was one of Scalingo's first employees. With a PhD in computer science, Étienne takes care of Research and Development at Scalingo. He also regularly contributes to this blog with technical articles.
Stay Updated
Get articles and platform updates in your inbox.
Ready to Deploy with Confidence?
Experience zero-downtime deployments, intelligent auto-scaling, and fully managed infrastructure. Start deploying your applications on Scalingo today.
No credit card required • Deploy in minutes • Cancel anytime





