Hi, I installed mymodule-1.0.jar, then removed the jar, replacing it with mymodule-1.1.jar. I did not remove any of the files from /modules/mymodule
The mgnl-bootstrap directory in mymodule-1.0.jar only contained an xml export of a commands folder. In mymodule-1.1.jar I added two new xml files; exports of the new dialogs and paragraphs folder. These did not get bootstrapped during the installation of mymodule-1.1.jar -there were only 2 installation steps - updating the module version number, and copying files e.g. jsp's. What I would like is that: 1) all new xml files get bootstrapped 2) and if any updates have been made to xml files already present in previous module version, the updated xml file is bootstrapped (I presume this new xml file will have the same UUID as the old version?) So, both of these requirements need to implemented via the ModuleVersionHandler? You suggest using NodeExistsDelegateTask. I see that this will work for bootstrapping new xml files, but if I want to update existing sections of the module configuration, how would be best to achieve that? I would have thought that my requirements are fairly standard when installing/updating a module, but from looking at DMSModuleVersionHandler there doesn't seem to be any generic way of achieving this - you have to specifically state what should happen for every case. Is this correct? All thoughts and helps are greatly appreciated! Thanks, Chris -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] Sent: 29 June 2008 01:13 To: [email protected] Subject: Re: [magnolia-user] custom module updates Hi Allan If I get you correctly, you - Installed mymodule-1.0.jar - ADDED mymodule-1.1.jar (without removing anything of mymodule 1.0) What did you do with the 1.0 module? Did you delete the 1.0 module (remove the jar file, delete the /modules/mymodule folder)? One reason why bootstrapping does not work could be that you are bootstrapping the exact same nodes again. With "exact same nodes" I mean nodes which have the same UUID. Bootstrapping will fail if the same node (so a node with the same UUID) already exists. So if you did not delete the / config tree, bootstrapping will not happen. What you can do: In your 1.0 module, just delete /modules/mymodule/config tree, stop Magnolia and remove the mymodule-1.0.jar from /WEB-INF/libs. Then add mymodule-1.1.jar and restart. The other, and in fact better way, is to add so called "Tasks" to your "ModuleVersionHandler". For example you could use the "NodeExistsDelegateTask", which adds a node if it is not there. Then you could add only the /config/newstuff tree, rather than the whole / config tree. Of course you could also check if the /config node is there and delete it prior to bootstrapping the whole /config tree again. I also recommend for the future to check logfiles. You usually will get very meaningful error messages. HTH Giancarlo On Jun 28, 2008, at 8:56 PM, Allan, CJ (Chris) wrote: > Hi, > > I'm having problems updating a custom module I have. I would just like > to add some new files, and bootstrap some new config files, but the > files don't seem to be getting bootstrapped into the config. > > I have tried simplifying my update to track the problem but still > can't > find it. > > For example, I have mymodule-1.0.jar and successfully install it - jsp > files, and bootstrapping config files. I then add another config > file to > the mgnl-bootstrap directory, and increment the file version in > mymodule.xml, and then try to install that (removing the previous jar, > and replacing it with the new one - mymodule-1.1.jar). Magnolia > recognises that it needs to update the module, goes through the > installation steps, but these are only 2 steps: updating the version > number and copying files. It does not bootstrap the config files. > > But if I start with a clean repository and install mymodule-1.1 then > everything gets installed correctly. So there is no problem with the > files themselves. It is just the updating process that doesn't seem to > want to bootstrap the new files when moving to the new version. > > Where am I going wrong?? Any help is greatly appreciated! > > Chris > <DIV><FONT size="1" color="gray">This e-mail and any attachments may > contain confidential, copyright and or privileged material, and are > for the use of the intended addressee only. If you are not the > intended addressee or an authorised recipient of the addressee > please notify us of receipt by returning the e-mail and do not use, > copy, retain, distribute or disclose the information in or attached > to the e-mail. > Any opinions expressed within this e-mail are those of the > individual and not necessarily of Diamond Light Source Ltd. > Diamond Light Source Ltd. cannot guarantee that this e-mail or any > attachments are free from viruses and we cannot accept liability for > any damage which you may sustain as a result of software viruses > which may be transmitted in or with the message. > Diamond Light Source Limited (company no. 4375679). Registered in > England and Wales with its registered office at Diamond House, > Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 > 0DE, United Kingdom > </FONT></DIV> > > ---------------------------------------------------------------- > for list details see > http://documentation.magnolia.info/ > ---------------------------------------------------------------- > ---------------------------------------------------------------- for list details see http://documentation.magnolia.info/ ---------------------------------------------------------------- <DIV><FONT size="1" color="gray">This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd. Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message. Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom </FONT></DIV> ---------------------------------------------------------------- for list details see http://documentation.magnolia.info/ ----------------------------------------------------------------
