Alexander, I have a repository with a prototype if you want to take a look. I just need to remove some crap and you're welcome to run with it if you want to do something with it. The method employed works by mutating the model once it has been read with a lifecycle participant. You can get pretty far using this method but ultimately I think that the DefaultModelBuilder will need to be changed. There are some limitations in having to deal with the fully populated model where you can't do things like inject new properties and have them be used because the ProjectBuilder has already interpolated them. We probably could add some extensions points that would allow this post processing to work but in the end I think it would be more efficient and a better design to just change the ModelBuilder.
On Apr 1, 2014, at 4:42 AM, Alexander Kriegisch <[email protected]> wrote: > Dear developers, > > I guess at least since 2008 Jason had the idea to implement Maven mixins, > i.e. a kind of include mechanism in order for users to be able to encapsulate > sets of dependencies (not just their version numbers as with import-scoped > BoMs) and re-use them throughout modules or even across projects. This is > something I (and probably many others) have been waiting for desperately > because via inheritance you can only have one aspect covered, but not > multiple ones. Comparing to single inheritance in OOP, in order to cleanly > encapsulate secondary (even cross-cutting) concerns there are powerful > concepts like AOP (I love to use AspectJ for that matter) or simpler ones > like mixins. I think mixins would suffice for Maven and massively support DRY > (don't repeat yourself), thus making it much easier to keep Maven > configurations cleaner and more maintainable. > > Having said that, I know it is always easier to ask for something than to > just implement it by myself (which I am uncapable of because I have never > touched or even seen the Maven code base). So, humbly and with all due > respect to you as a newbie on this list, I am asking if mixins are still on > the development agenda and if the feature has a rather low or high priority. > > With kind regards > -- > Alexander Kriegisch > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > Thanks, Jason ---------------------------------------------------------- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl http://twitter.com/takari_io --------------------------------------------------------- happiness is like a butterfly: the more you chase it, the more it will elude you, but if you turn your attention to other things, it will come and sit softly on your shoulder ... -- Thoreau
