Print
Building Custom plugins using Maven

Building Custom plugins using Maven //TODO..

If you are coming from an 'Ant only' background to XDoclet2, then Maven might appear a little out of place initially. I also felt that way until I finally decided to give it a try!. Maven indeed makes java builds so much simpler, ofcourse, as long as you are ready to give into some of the restrictions it imposes on you (personally, I did'nt find it too restrictive though).

Building Custom Plugins

Thanks to Maven's 'Multiproject' build feature, building custom XDoclet2 plugins could'nt have gotten any easier. Maven's 'Multiproject' feature employs Maven POM (Project Object Model) inheritance whereby all Maven 'sub-projects' inherit the properties of the top-level/common project.

The toplevel project typically defines all properties common to the sub-projects. The sub-projects can override certain properties while adding to others (for eg dependencies added at the sub-project level gets added to the ones already existing in the parent project). All XDoclet2 plugins are built the same way as a result. XDoclet2 on its own might be really light weight but it has dependencies on numerous other components (Pico,QDox, Generama,commons-* packages, etc). Its probably unfair to have plugin developers track those dependencies and it might change with subsequent XDoclet2 releases too. XDoclet2 solves this problem by defining a common Maven project.xml for everybody to inherit from.

Powered by Atlassian Confluence