No problem, I will write up a little description of the approach in the README.md file.
As a user you are familiar with the pom.xml and internally what we use to parse that is called the ModelBuilder. It handles inheritance, profile application, property interpolation, dependency management and those sorts of things. What it gives to you at the end is the fully fleshed out model or what we call a MavenProject. A lifecycle participant has the ability to inspect and potentially mutate MavenProject instances before a build is executed. A number of systems utilize this to change dependency information before the build is executed like Tycho. But at this point I surmise it may be too late. Really as a user you probably have a better perspective how the system should work. The hard part is defining how a mixin would be defined, what the rules would be for applying the mixin and validating them. At the very least you should be able to prototype with the hacked up lifecycle participant and you can see if it's too limiting. I'll try to clean up the repo tonight and push it to Github so you can take a look. On Apr 1, 2014, at 11:31 AM, Alexander Kriegisch <alexan...@kriegisch.name> wrote: > Jason, > > I guess I am going to accept your generous offer even though as a fairly > average Maven user I have not understood half of what you explained about the > limitations and implications of your current prototype and a projected final > solution. > > Feel free to send me private messages whenever you are ready or just stay > here on the list. I will follow your path and am hoping to at least provide > some valuable feedback in addition to creating extra work on your side. > -- > Alexander Kriegisch > > >> Am 01.04.2014 um 16:57 schrieb Jason van Zyl <ja...@takari.io>: >> 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 <alexan...@kriegisch.name> >>> wrote: >>> 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. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > Thanks, Jason ---------------------------------------------------------- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl http://twitter.com/takari_io --------------------------------------------------------- In short, man creates for himself a new religion of a rational and technical order to justify his work and to be justified in it. -- Jacques Ellul, The Technological Society