Search |
|||||||||||||
Dependency Managment with Glassfish Updatecenter and IPSPosted by driscoll on October 1, 2008 at 3:23 PM PDT
In a previous blog on the topic, I talked about creating a Glassfish Update Center Module. The example I used didn't have any notion of dependencies. This is fine for the very simple case, but obviously most pacakges actually rely on other packages as well. This notion is pretty common to most dependency management systems, and IPS handles it pretty well. The documentation for IPS has gotten a lot better since I last wrote about this, so I'd urge you to check it out. In particular, the passage on dependency management is pretty easy to understand. Here's a section from that document that explains the three types of dependencies:
So, the first two (require and optional) seem pretty straightforward, but what would you use the last one for? Why would you ever need to specify both a floor and a ceiling for the package dependency? As it happens, the answer is pretty straightforward. In the case of releasing beta software, you want to NOT automatically update, but rather, have the user manually select the software for update. Here's how to format an incorporate dependency for a beta release (this assumes that you already have a sample version 4 installed):
"name" : "sample",
"version" : "5.0",
"depends" : {
"pkg:/sample@5" : {"type" : "incorporate"}
},
Note that there's currently a bug in Glassfish's updatetool - if you specify an incorporate dependency, it won't automatically update, but it will also not automatically display as an available update. You have to manually choose to display all versions (Menu - View - Veiw All Versions) to see it in the list of available updates. This is currently listed as a bug, and I expect it'll be fixed by FCS. »
Related Topics >>
Glassfish Comments
Comments are listed in date ascending order (oldest first)
|
|||||||||||||
|
|