Eclipse users know this feature well. Using this feature we can serve the web application directly from the exploded directory structure of the development workspace.

The main benefits are:

  • You don't need to build archive files such as JARs and WARs.
  • When you change a resource in your workspace, the change is reflected in the running webapp without redeploying the webapp or restarting the server.

When Magnolia 5.5.x was released it came with an upgrade to Tomcat server as well. The tomcat bundle ships with version 8.5.5. If you try to develop in Eclipse with Tomcat 8.5.5 then you may encounter some problems at startup.

ERROR info.magnolia.init.MagnoliaServletContextListener : Oops, Magnolia could not be started
info.magnolia.module.ModuleManagementException: No module definition was found.

Options

  1. For development it should be fine to use Tomcat 7, which does not have this issue.
  2. Use a tool like JRebel.
  3. Switch to a different IDE that does not have this issue.
  4. Use the properties file workaround. Set your magnolia.app.rootdir to a literal value.

    magnolia.app.rootdir= <...>/parent-project/magnolia-webapp/src/main/webapp
    magnolia.home=${magnolia.app.rootdir}
  • No labels

1 Comment

  1. Unfortunately 4. does not solve the main problem of not detecting class changes without a manual save within them. Only classes are detected where you do a manual change and save. If you open a project that has changes compared to the head, it wont detect them (also not over a clean & rebuild of the project). So its not a practical option for project development where you have Java changes in more than in one class you are touching.