You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Michael B?ckling (JIRA)" <ji...@codehaus.org> on 2006/01/12 17:53:01 UTC

[jira] Created: (MNG-1959) maven-plugin-tools-ant: faulty variable interpolation

maven-plugin-tools-ant: faulty variable interpolation
-----------------------------------------------------

         Key: MNG-1959
         URL: http://jira.codehaus.org/browse/MNG-1959
     Project: Maven 2
        Type: Bug

  Components: Plugin Creation Tools  
    Versions: 2.0.1    
 Environment: WinXP SP2
Maven 2 SNAPSHOT
    Reporter: Michael Böckling
    Priority: Minor


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>).

-- 
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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org