Velocity
  1. Velocity
  2. VELOCITY-448

Can't define macro in separate file and use it in another file.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: 1.6
    • Component/s: None
    • Labels:
      None
    • Environment:
      WindowsXP

      Description

      I my first file called "myDefinition.vm" , I difined a trivial macro
      #macro ( myMycro $p1 $p2)
      $p1 $p2
      #end

      In my second file, I parse and call my macro:

      #parse( myDefinition.vm")
      #myMacro( "apple" "orange)

      The result is always a single line:

      #myMacro( "apple" "orange)

      Velocity does not recognize the definition of my macro. I tried putting the macro is the same file and that works. But when the definition from another file does not seem to work.

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              Colbert Philippe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development