[ http://jira.codehaus.org/browse/MPLUGIN-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=190819#action_190819 ]
Stefan Grinsted edited comment on MPLUGIN-160 at 9/13/09 6:53 PM: ------------------------------------------------------------------ Sure. I can make a sample project, when I get back from vacation in 1½ weeks. In the meantime you are welcome to check out a project containing my mentioned workaround, and remove the workaround to see that the requirements section doesn't end up in the generated plugin.xml. The project is located on google code at http://octools.googlecode.com/svn/ocbuild/branches/maven (pardon the mess. It started out as an ant-only project.) If you from the oc.mojos.xml remove the parameter called something with workaroundFor..., it will not generate a requirements section for that mojo in the plugin.xml. Even though the components sections is specified in the oc.mojos.xml ( - which will result in the expressions not being correctly evaluated when using the plugin in other projects). Note: You will probably have to skip unit tests, as they require a running mysql with no root password. was (Author: ste...@e-nation.dk): Sure. I can make a sample project, when I get back from vacation in 1½ weeks. In the meantime you are welcome to check out a project containing my mentioned workaround, and remove the workaround to see that the requirements section doesn't end up in the generated plugin.xml. The project is located on google code at http://octools.googlecode.com/svn/ocbuild/branches/maven (pardon the mess. It started out as an ant-only project.) If you from the oc.mojos.xml remove the parameter called something with workaroundFor..., it will not generate a requirements section for that mojo in the plugin.xml. Even though the components sections is specified in the oc.mojos.xml ( - which will result in the expressions not being correctly evaluated when using the plugin in other projects). > PluginDescriptorGenerator doesn't generate component requirements for > MojoDescriptor.getRequirements() > ------------------------------------------------------------------------------------------------------ > > Key: MPLUGIN-160 > URL: http://jira.codehaus.org/browse/MPLUGIN-160 > Project: Maven 2.x Plugin Tools > Issue Type: Bug > Components: API > Affects Versions: 2.5 > Reporter: Stefan Grinsted > Priority: Minor > Attachments: patch.txt > > > The part that generates the <requirements> section for a mojo in > PluginDescriptorGenerator, only includes requirements for components, if they > are specified via a parameter with expression=${component.*}, not if it is > actually specified as a required component using the <components> element. > I have created a patch, which includes the ComponentRequirements as > requirements when generating the <requirements> element. > Until released, the following workaround can be used in the module.mojos.xml, > to get the required component in the plugin.xml: > <parameter> > <name>workaroundForPathTransformer</name> > <required>true</required> > > <expression>${component.org.apache.maven.project.path.PathTranslator}</expression> > <type>org.apache.maven.project.path.PathTranslator</type> > <description>This is a workaround to get the PathTransformer as a > Requirement in the plugin.xml.</description> > </parameter> -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira