Uploaded image for project: 'Maven Plugin Tools'
  1. Maven Plugin Tools
  2. MPLUGIN-160

PluginDescriptorGenerator doesn't generate component requirements for MojoDescriptor.getRequirements()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • 2.5
    • None
    • API
    • None
    • Patch

    Description

      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>

      Attachments

        1. patch.txt
          5 kB
          Stefan Grinsted

        Activity

          People

            rfscholte Robert Scholte
            stefan@e-nation.dk Stefan Grinsted
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: