Texen
  1. Texen
  2. TEXEN-4

Add support for <property> and <propertyset> nested elements to TexenTask.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 1.6
    • Labels:
      None

      Description

      I would like to be able to use nested <property> and <propertyset> elements as in

      <texen ...>
      <property name="..." value="..."/>
      <propertyset .../>
      </texen>

      and then have the properties available in the Velocity context.

      Note that Ant allows namespaces and dots whereas Velocity does not (i.e. dots have a different meaning). So an Ant property name like 'ns:a.b.c' would become something like ns_a_b_c in Velocity context.

      1. patch.txt
        28 kB
        Hilco Wijbenga
      2. texen.tar.bz2
        10 kB
        Hilco Wijbenga
      3. TexenTask.java.diff
        18 kB
        Hilco Wijbenga
      4. texen.xml.diff
        1 kB
        Hilco Wijbenga

        Issue Links

          Activity

          Hide
          Barrie Treloar added a comment -

          Adding to the context is similar to specifying a new contextProperties as per TEXEN-11

          Show
          Barrie Treloar added a comment - Adding to the context is similar to specifying a new contextProperties as per TEXEN-11
          Barrie Treloar made changes -
          Link This issue is related to TEXEN-11 [ TEXEN-11 ]
          Henning Schmiedehausen made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          Affects Version/s 1.5 [ 12310253 ]
          Key VELOCITY-422 TEXEN-4
          Project Velocity [ 12310104 ] Texen [ 12310651 ]
          Component/s Texen [ 12310216 ]
          Henning Schmiedehausen made changes -
          Fix Version/s 1.6 [ 12310290 ]
          Fix Version/s 1.5 [ 12310253 ]
          Hide
          Henning Schmiedehausen added a comment -

          Missed the 1.5 boat.

          Show
          Henning Schmiedehausen added a comment - Missed the 1.5 boat.
          Will Glass-Husain made changes -
          Fix Version/s 1.5 [ 12310253 ]
          Hide
          Will Glass-Husain added a comment -

          marking this for 1.5

          Show
          Will Glass-Husain added a comment - marking this for 1.5
          Hide
          Will Glass-Husain added a comment -

          never mind, I get it. Maybe we could have the ant script generate this.

          Show
          Will Glass-Husain added a comment - never mind, I get it. Maybe we could have the ant script generate this.
          Hide
          Will Glass-Husain added a comment -

          what is test.jar? It's very unusual to store a jar file in source control?

          Show
          Will Glass-Husain added a comment - what is test.jar? It's very unusual to store a jar file in source control?
          Hilco Wijbenga made changes -
          Attachment patch.txt [ 12320798 ]
          Hide
          Hilco Wijbenga added a comment -

          I didn't realise diff could be used like this. Very nice! The attached file is exactly what you suggested: 'svn diff .' in the velocity directory.

          I had to remove test/texen-classpath/test.jar (since it's binary) so please rerun test/texen-classpath/mkjar.sh before checking in!

          Show
          Hilco Wijbenga added a comment - I didn't realise diff could be used like this. Very nice! The attached file is exactly what you suggested: 'svn diff .' in the velocity directory. I had to remove test/texen-classpath/test.jar (since it's binary) so please rerun test/texen-classpath/mkjar.sh before checking in!
          Hide
          Will Glass-Husain added a comment -

          Sounds very promising.

          Sorry to be obnoxious about this, but...

          Could you submit this as one diff? It's really easy. Just go to the root velocity directory and type

          svn diff . > patch.txt

          It's much much easier to apply. It also captures all new files automatically.

          Thanks again for contributing.

          Show
          Will Glass-Husain added a comment - Sounds very promising. Sorry to be obnoxious about this, but... Could you submit this as one diff? It's really easy. Just go to the root velocity directory and type svn diff . > patch.txt It's much much easier to apply. It also captures all new files automatically. Thanks again for contributing.
          Hilco Wijbenga made changes -
          Attachment texen.tar.bz2 [ 12320793 ]
          Hide
          Hilco Wijbenga added a comment -

          The contents of the attached tarball is listed below.

          The patch itself (code & documentation):
          src/java/org/apache/velocity/texen/ant/TexenTask.java.diff
          xdocs/docs/texen.xml.diff

          Test stuff:
          test/texen/compare/nested_elements.txt
          test/texen/templates/nested_elements.vm
          test/texen/templates/Control.vm.diff
          test/texen-classpath/compare/nested_elements.txt
          test/texen-classpath/jar-contents/nested_elements.vm
          test/texen-classpath/jar-contents/Control.vm.diff
          test/texen-classpath/test.jar
          src/test/org/apache/velocity/test/TexenTestCase.java.diff
          src/test/org/apache/velocity/test/TexenClasspathTestCase.java.diff
          build/testcases.xml.diff

          Show
          Hilco Wijbenga added a comment - The contents of the attached tarball is listed below. The patch itself (code & documentation): src/java/org/apache/velocity/texen/ant/TexenTask.java.diff xdocs/docs/texen.xml.diff Test stuff: test/texen/compare/nested_elements.txt test/texen/templates/nested_elements.vm test/texen/templates/Control.vm.diff test/texen-classpath/compare/nested_elements.txt test/texen-classpath/jar-contents/nested_elements.vm test/texen-classpath/jar-contents/Control.vm.diff test/texen-classpath/test.jar src/test/org/apache/velocity/test/TexenTestCase.java.diff src/test/org/apache/velocity/test/TexenClasspathTestCase.java.diff build/testcases.xml.diff
          Hilco Wijbenga made changes -
          Attachment texen.xml.diff [ 12320769 ]
          Attachment TexenTask.java.diff [ 12320768 ]
          Hide
          Hilco Wijbenga added a comment -

          This is the actual patch; test cases are on their way too.

          Show
          Hilco Wijbenga added a comment - This is the actual patch; test cases are on their way too.
          Hide
          Will Glass-Husain added a comment -

          Hilco - were you going to attach some files?

          Show
          Will Glass-Husain added a comment - Hilco - were you going to attach some files?
          Will Glass-Husain made changes -
          Field Original Value New Value
          Fix Version/s 1.5 [ 12310253 ]
          Hide
          Will Glass-Husain added a comment -

          Given how close we are to feature freeze, I'm going to mark this as unscheduled until I have a chance to review and confirm all pieces are present.

          Show
          Will Glass-Husain added a comment - Given how close we are to feature freeze, I'm going to mark this as unscheduled until I have a chance to review and confirm all pieces are present.
          Hilco Wijbenga created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Hilco Wijbenga
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Development