Question

I know I can put some files into _diffs folder and these files will be placed up upon deploy. But I can also edit files directly inside docroot and they will work too. Under Eclipse it is even more comfortable, since changing any file under docroot causes Eclipse to automatically update changed files on the running server -- no need to run long ant deploy target.

So what is the sense of _diffs folder? And can I avoid using of it, either while standalone development or under Eclipse development?

Was it helpful?

Solution

If you use the Liferay IDE plugins for eclipse (or Liferay Developer Studio), your theme will be transparently deployed even when you edit in _diffs (without restarting the webapplication - only the resources are copied to the appserver.

The folder is used to decouple your changes from Liferay's changes. The docroot folder contains hundreds of files (images, css, etc.) while your _diffs folder typically contains only a few files that differ from the default theme. This provides a massively better maintainability, as you know exactly what file you have changed - any update that Liferay delivers might come with additional defaults that you don't care about, so you might only need to recompile on a new SDK in order to upgrade to the next version. In case changes are required, you'll only have to identify the single file of your changes that you'll have to adapt, instead of doing three-way merge between two Liferay versions and your changes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top