From: <try...@st...> - 2003-09-25 14:10:55
|
Hi As suggested by Andy on irc, I would like to propose a new 'package' plugin for creating deb and rpm packages. It should also support the creating of package repositories for apt and the likes. I've rambeled up a suggestion at my wiki: http://wiki.nostdal.net/Articles_2fMaven_2fPackagePlugin I would like some feedback on the suggestion either by comments on the list or just change the wiki page. The page actually discuss two things, the maven-package-plugin and a suggestion for common goal naming of the package plugins. As always, I'm online on #maven at irc.werken.com Trygvis |
From: Andy J. <an...@aj...> - 2003-09-25 16:14:00
|
On Thursday 25 Sep 2003 15:10, Trygve Laugst=F8l wrote: > As suggested by Andy on irc, I would like to propose a new 'package' > plugin for creating deb and rpm packages. It should also support the > creating of package repositories for apt and the likes. > > I've rambeled up a suggestion at my wiki: > > http://wiki.nostdal.net/Articles_2fMaven_2fPackagePlugin > > I would like some feedback on the suggestion either by comments on the > list or just change the wiki page. Its a shame that Maven plugins do not support the idea of subclassing :-) W= hat=20 then would be perfect would be to have the "package" plugin and then derive= =20 RPM, Deb, etc from that so hence we have the same goals and properties and= =20 just add on specific things for particular output formats. Oh well ... I'm not sure of how well Maven plugins support the idea of *using* a differ= ent=20 plugin ... kind of like a sub-plugin ... with this we could have a package= =20 plugin that gives a lot of the logic for packaging systems, and then we hav= e=20 RPM, Deb plugins that use this package plugin. I think the idea of having a common interface is definitely the way to go .= =2E.=20 since the input is basically the same, and the output is a file. Obviously= =20 there are other formats of "package" ... e.g tgz, zip. What I'm not convinc= ed=20 about is whether to have these as a single plugin (and have logic internall= y=20 that checks on the output type and does things accordingly), or whether to= =20 have separate plugins with the same goals and properties. I think i'd tend towards having separate plugins solely because there are=20 projects where you want to output multiple package formats ... so I could=20 output a Deb, RPM, and TGZ. If I had these as a single plugin I would have = to=20 edit my project.properties and then run the plugin, and edit it again and r= un=20 it ... whereas if i have separate plugins I would just do "maven rpm", "mav= en=20 deb", "maven tgz" etc. Having separate plugins does give us the problem of= =20 maintaining consistency in goal and property naming - adopting your "create= ",=20 "create-snapshot", and "copy-resources" in Deb and RPM for now makes a lot = of=20 sense. =2D-=20 Andy |
From: <try...@st...> - 2003-09-25 16:35:29
|
On Thu, 25 Sep 2003, Andy Jefferson wrote: > On Thursday 25 Sep 2003 15:10, Trygve Laugst=F8l wrote: > > As suggested by Andy on irc, I would like to propose a new 'package' > > plugin for creating deb and rpm packages. It should also support the > > creating of package repositories for apt and the likes. > > > > I've rambeled up a suggestion at my wiki: > > > > http://wiki.nostdal.net/Articles_2fMaven_2fPackagePlugin > > > > I would like some feedback on the suggestion either by comments on the > > list or just change the wiki page. > > > Its a shame that Maven plugins do not support the idea of subclassing > :-) What then would be perfect would be to have the "package" plugin and > then derive RPM, Deb, etc from that so hence we have the same goals and > properties and just add on specific things for particular output > formats. Oh well ... > > I'm not sure of how well Maven plugins support the idea of *using* a > different plugin ... kind of like a sub-plugin ... with this we could > have a package plugin that gives a lot of the logic for packaging > systems, and then we have RPM, Deb plugins that use this package plugin. > > I think the idea of having a common interface is definitely the way to > go ... since the input is basically the same, and the output is a file. > Obviously there are other formats of "package" ... e.g tgz, zip. What > I'm not convinced about is whether to have these as a single plugin (and > have logic internally that checks on the output type and does things > accordingly), or whether to have separate plugins with the same goals > and properties. > > I think i'd tend towards having separate plugins solely because there > are projects where you want to output multiple package formats ... so I > could output a Deb, RPM, and TGZ. If I had these as a single plugin I > would have to edit my project.properties and then run the plugin, and > edit it again and run it ... whereas if i have separate plugins I would > just do "maven rpm", "maven deb", "maven tgz" etc. Having separate > plugins does give us the problem of maintaining consistency in goal and > property naming - adopting your "create", "create-snapshot", and > "copy-resources" in Deb and RPM for now makes a lot of sense. I think you misunderstod my idea. My idea is to create a set of hooks that the different package plugins will use. These hooks will be as simple as a goal named 'package:create'. Then each of the package plugins will have a goal called '<type>:create'. And for intergrating with the package plugin it will have a pre or post goal called called 'package:create' that will simply attain '<type>:create'. When we have a odd cind of subclassing. It might not be the best solution but it works and it opens for extendability. When executing the package:create goal will be something like: (Assuming there is a deb and rpm plugin and they are registered as post goals) package:init-filesystem rpm:init-filesystem deb:init-filesystem package:copy-resources deb:copy-resources rpm:copy-resources package:create deb:create rpm:create Now, if I would like to finetune the packaging for a specific type of package I would use the maven.<type>. namespace for the properties. The common properties would go in maven.package. Did I make things a bit clearer? Does anyone like this idea? Does it add any value to the packaging bit of a project? If there is a consensus about this idea I would like to change the rpm and deb plugins so that they have the 'same' goals and to create the maven-package-plugin. Trygvis |