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

maven-plugin-tools-ant: faulty variable interpolation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • maven-plugin-tools-ant
    • None
    • WinXP SP2
      Maven 2 SNAPSHOT

    Description

      Using ANT as Mojo language, there is a bug in the variable interpolation.

      Example parameter:
      <!-- performexec -->
      <parameter>
      <description>Execute a binary</description>
      <name>performexec</name>
      <expression>${performexec}</expression>
      <required>false</required>
      <readonly>false</readonly>
      <type>java.lang.String</type>
      </parameter>

      Example Mojo call:
      <project>
      <target name="someproject">
      <taskdef name="someTask/>"
      <someTask performexec="${performexec}"/>
      ...

      Preconditions:

      • ${performexec} has no default value
      • ${performexec} is not marked as required
      • ${performexec} is not set in POM that executes the Ant Mojo plugin

      Observed behaviour:

      • The string "${performexec} " is literaly passed to the corresponding task.

      Expected result:

      • ${performexec} should be null.

      If the parameter has a <defaultValue></defaultValue> tag, above error occurs too. I'd expect that to set the parameter to the empty string (instead of null when leaving out <defaultValue></defaultValue>).

      Attachments

        Activity

          People

            Unassigned Unassigned
            buddycasino Michael Böckling
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: