Customizations lost after restart, why?

I'm trying to customize Nuxeo by changing some files, but every time I restart my changes are lost.

This happens whenever I try to modify:

  • a file in conf/ like conf/Catalina/localhost/nuxeo.xml
  • a file in nxserver/config/ like nxserver/config/default-repository-config.xml
  • a file in nxserver/nuxeo.war/ like nxserver/nuxeo.war/login.jsp or any xhtml file

Why is that? What should I do?

0 votes

1 answers

2675 views

ANSWER



About

  • a file in conf/ like conf/Catalina/localhost/nuxeo.xml
  • a file in nxserver/config/ like nxserver/config/default-repository-config.xml

Nuxeo is using configuration templates (see https://doc.nuxeo.com/x/0AB9). Those templates are deployed at server startup (unless you set nuxeo.force.generation=false in nuxeo.conf) and so, are overwriting your files.

If you want to customize them, you have to change their source in $NUXEO_HOME/templates/ (not recommended since those files are part of Nuxeo) or create your own custom template with your modified files (recommended method). Then, make your custom template being deployed by changing nuxeo.templates property in nuxeo.conf. You can test your configuration with “./bin/nuxeoctl configure”.

About

  • a file in nxserver/nuxeo.war/ like nxserver/nuxeo.war/login.jsp or any xhtml file

Such resources are deployed by the Nuxeo bundles. For instance, login.jsp is deployed by nuxeo-platform-webapp. In order to overwrite it, you have to create a bundle which will be loaded after nuxeo-platform-webapp and deploy your customized version of login.jsp (see https://doc.nuxeo.com/x/kwBu).

2 votes