Creating a static WAR of Nuxeo allows you to deploy Nuxeo in an environment where your application server only allows WAR installation. Keep in mind that when you do this, the following dynamic features will not work (we are inside a static WAR):
- Nuxeo Studio hot reload
- Nuxeo Marketplace integration (hotfixes and packages installation)
Those limitations implies that if you want to change the distribution (for instance install or upgrade some Nuxeo Packages, change the configuration...), you must replay the following procedure and deploy the WAR newly generated.
It is possible to keep some "dynamic" aspect on some parameters by giving them a variable as value: for instance,
Then, you can use the produced Nuxeo WAR in an environment where
custom.nuxeo.db.host is defined from outside.
Creating a Nuxeo Static WAR Distribution
Here is the way to create your own static WAR distribution:
- Download a Nuxeo Tomcat distribution.
- Unzip it in somewhere (let's call it
Customize and configure your application as usual:
- Deploy some Nuxeo Packages.
- Create your own configuration templates.
Copy your specific bundles into
Such a practice is not recommended: you should deploy Nuxeo Bundles via a Nuxeo Package or, at least, via a custom configuration template
- Start the server.
- Check that your Nuxeo is configured as expected (database configuration, LDAP authentication, etc.).
- Stop the server.
Launch this following command:
$NUXEO_HOME/bin/nuxeoctl pack /tmp/nuxeo-war.zip
Your static WAR distribution will be generated into
The generated ZIP contains what needs to be copied over a standard Tomcat installation:
nuxeo-war.zip/ |-- endorsed (jaxb and jaxws api libs that should replace packages provided by default JDK that are outdated) |-- lib (common libs) |-- README-NUXEO.txt `-- webapps `-- nuxeo (exploded WAR that you can zip if needed)
Installing Nuxeo in the Target Tomcat
The distribution is mainly an overlay to be extracted at the root of your Tomcat instance.
You must provide the Nuxeo logs path and start the Catalina with more memory than its defaults; for instance:
# Usually set in bin/catalina.sh rather than export export JAVA_OPTS="$JAVA_OPTS -Dnuxeo.log.dir=logs" export CATALINA_OPTS="$CATALINA_OPTS -Xms512m -Xmx1024m -XX:MaxPermSize=512m" ./bin/catalina.sh start
The target database will be the one you defined in your source Nuxeo instance, and the default for the Nuxeo directories are:
$TOMCAT_HOME/nuxeo/web(for WebEngine modules).
See Configuration Parameters Index (nuxeo.conf) for more details about these config parameters of the Nuxeo Platform.
If you need to change the values for these paths, setting System properties is not enough: you must add
context-param entries in the Nuxeo
WEB-INF/web.xml file (see JavaDoc of NuxeoStarter for more details).
Upgrading or Installing Hotfixes
Because of the limitations implied by the static WAR, you must generate a new WAR if you want to upgrade the server or apply some hotfix.