IntroductionWhat is it?The Jade Plugins project is a list of Jar modules, Plexus Components and Maven2 plugins, that are using Java5 goodies like annotations and generics. BenefitsUsing Annotated Plug-in Mojos from Maven Anno Mojo, jade plugins can inherit and delegate to each others, without copy/pasting parameters and code. Having Annotations completion, documentation and inheritance while developing Maven2 plugins proved to be very helpful. This way it is possible to extends any Maven2 jade plugins just by Java inheritance, and use all OO design while writing plexus components and plugins. Real Life ExampleHere is how we use jade-plugins in big projects. Features
Jade Plugins contains some new plugins and some migration from maven plugins and codehaus mojo project. New PluginsMultijarThe first usage of Maven Anno Mojo was for the Multijar, which allow the creation of multiple artifacts (jar, zip, tar) for one pom file and reload them on dependencies. Javac
The javac plugin
came from the need to avoid the plexus scanner and activate directly the javac task of Ant. Assembly
The Assembly Plugin
aggregate the information acquired in the Multijar to create installation packages
like install shield, RPM, tar or zip, out of the Maven2 dependency graph.
TestNGThe TestNG Plugin is a wrapper of the TestNG Ant task, and allow the usage of TestNG 5.5 and all its possible configurations.Plugins MigratedNativeOne of the most important work in jade-plugins is the migration of codehaus Dan T. Tran native plugin to maven anno mojo. The Jade Native Plugin added a lot of features like transitive dependencies, include files distribution, Unit Tests, static analysis, and parallel compilations.IdeaJade plugins migration of maven idea plugin to maven anno mojo. The Jade Idea Plugin added a some features like dynamic template location, group hierarchy based on groupId, and project renaming.Core JarsNow that Maven Plugin can use OO, we find a lot of Copy/Paste code that can be aggregated in common jars. This common code contains features like:
|
|||