The contents of this document are a work in progress
Plexus Component Descriptor Creator
NOTE: This document and the CDC itself is currently a work in progress.
The Component Descriptor Creator (or CDC for short) is a tool that will create the components.xml
file from your Java code. It uses JavaDoc tags to gather the information it needs to create the component descriptor.
There is a tag for marking components, requirements and configuration. Each of the tags can have parameters as documented below.
Component Tag Parameters
Tag | Required | Description |
role | y | The role of the component. |
role-hint | y | The role-hint of the component. |
version | n | The component version. |
lifecycle-handler | n | The lifecycle handler of the component. TODO: link to the different lifecycle handlers |
instantiation-strategy | n | The instantiation strategy of the component. TODO: link to the different instantiation strategies |
/**
* @plexus.component
* lifecycle-handler="plexus-configurable"
*/
public class DefaultActionManager
extends AbstractLogEnabled
implements ActionManager, Serviceable
{
Requirement Tag Parameters
These tags are used on fields to state requirements. TODO: it should be possible to override the role for a normal field.
Tag | Required | Description |
role | y/n | Only required if the field is a List or Map |
role-hint | n |
/**
* @plexus.requirement
* role-hint="foo"
*/
private ActionManager actionManager;
Configuration Tag Parameters
Note that the default value tag won't be required in the future when these tags will be used to generate a separate configuration declaration section.
Tag | Required | Description |
default-value | y | Sets the default value for the configuration field |
/**
* @plexus.configuration
* default-value="Trygve"
*/
private String name;