We are upgrading dotCMS from old to new one.
How to handle those *-ext files in OSGI? Our static plugin have these files.
web-ext.xml, Language-ext.properties, dotmarketing-config-ext.properties, toolbox-ext.xml
Or we need mount to /srv/OVERRIDE. Copy all those files to this mounted path?
Hi, thanks for posting your question! I just reached out internally to our developer team to see what they recommend. Will get a response from them back out to you.
You need to move away from those static files (and the ideas behind them and move into a world of the system_table, environmental variables and OSGi based Viewtools and WebInterceptors.
There is no need to manually update the dotmarketing-config.properties file as every value in that file can be overridden using the system_table or env vars.
The only caveat are the env vars that specify system level properties like db and es connections. These are needed before dotcms starts up and should always be provided by the container environment, e.g. passed in as docker or k8 env variables.
Viewtools should be delivered via OSGi - you can see an example here:
Anything you are placing in the web.xml you should either rewrite as a REST endpoint or a WebInterceptor. General rule of thumb is that If you need a servlet or a filter, use the webinterceptor, if you need a jax-rs rest endpoint, it is probably easiest to use a REST endpoint.
Again, you can find examples in our plugin-seed repo here:
There are a ton of examples of all these patterns together in some of our publicly available plugins in the community repo:
Thanks for the help, we are also upgrading to the latest spring and some other dependency , found out that the plugin example show that dotCMS still using javax instead of jakarta. For example Result intercept(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletRequest.HttpServletResponse response).
Is this means we still need to use older version of spring to support javax? as I know spring 6+ version already change to Jakarta EE.