 |
There are a bunch of pages related to templates synchronization between instances deployment. If someone wants to volunteer and merge them, that'd be much appreciated. Also, it seems these are pretty much conflicting with the concept of modules introduced in Magnolia 3.0 and further improved in 3.5.
|
Requirements
Requires Apache Ant installed. Magnolia source or binaries.
Development modes
There are two ways to work with modules like this (examples):
- As a developer - working with the magnolia source tree in c:\projects\magnolia-all
- As a user - working with the magnolia binaries in
c:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\magnoliaAuthor
Starting a new module
When starting your own module, copy the directory structure from magnolia-all\magnolia (this is the webapp module of magnolia).
Typical directory structure for a developer
c:\projects\magnolia-all\magnolia <-- original webapp module
c:\projects\magnolia-all\magnolia-module-mine <-- our module
Typical directory structure for a user
- c:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\magnoliaAuthor
- c:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\magnoliaPublic
- c:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\magnolia-module-mine
What to do with the attached build.xml
The attached build.xml is put in magnolia-module-mine
For example, your templates or JSPs should be kept in c:\projects\magnolia\magnolia-module-mine\src\main\webapp\templates\jsp
Now you must change the variable "magnolia-dir" inside build.xml to the one you want to copy resources into. This can be either:
- <property name="magnolia-dir" value="magnoliaAuthor" /> for copying into the authoring environment
- <property name="magnolia-dir" value="magnoliaPublic" /> for copying into the public environment
- <property name="magnolia-dir" value="magnolia/src/main/webapp"/> for copying into a development environment
Installing the module
- Checkout/copy your magnolia-module-mine next to your magnolia instance
- Set the magnolia-dir property in build.xml to be the magnolia instance where you want the module
- Run ant (default goal) inside magnolia-module-mine
- Repeat for each instance
If your module contains any classes, you need to manually copy these into magnolia's classpath (see the TODO).
Pretty simple and straightforward if you know ant. I'm sure it could be done in a more elegant way, and even be incorporated into maven2, but I haven't been bothered with finding out how this is done.
Overwriting pom.xmls
There is also some functionality if you have your own pom.xml inside magnolia-module-mine\poms which will overwrite the poms in magnolia webapp and magnolia-project, but this is for advanced users only 
TODO: Make an ant goal that builds a magnolia-module-mine.jar and copies it into magnolia-dir\WEB-INF\lib\
In its previous incarnation on JspWiki, this page was last edited on Feb 9, 2007 10:10:40 AM by FerrisNicolaisen
Other known authors include :
This article lacks the "why" - why do I want to copy templates? What's the goal of this?