Texen
  1. Texen
  2. TEXEN-6

Let's see if we can make Texen task to SKIP file generation if the results are UP TO DATE - working solution proposed

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      Hello, developers!

      I know that in the general case we can not detect that the output of TEXEN
      ant task is newer then ALL the sources - cause we don't know all the sources.

      But in a specific
      situation - if we assume that ALL THE SOURCE FILES are located in the TEMPLATEPATH directory and ALL
      THE FILES in the TEMPLATEPATH directory are template sources WE CAN compare their timestamp to
      the output file lastModified() timestamp.

      I'm attaching a SAMPLE IMPLEMENTATION (the Ant
      task I'm using now) as an example – it maybe a new Ant task (I called it TEXENCOND - conditional TEXEN)
      or a boolean flag on the regular TEXEN task.

      Motivation: I use VELOCITY VERY EARLY in my build
      chain:
      TexenTask->JavaCC->JavaC
      so not changing lastModified() on the files generated by
      Texen really saves an amount of build time and avoids lots of messages from JavaCC cluttering the
      screen.

      And I can imagine even using it like this:
      TexenTask->JJTree->JavaCC-
      >JavaC

      Hoping the code I use for myself will be usefull for others too!

        Activity

        Hide
        tagunov added a comment -

        Created an attachment (id=5968)
        Sample implementation of SKIP-generation-step-if-result-UP-TO-DATE TEXEN ANT Task

        Show
        tagunov added a comment - Created an attachment (id=5968) Sample implementation of SKIP-generation-step-if-result-UP-TO-DATE TEXEN ANT Task
        Hide
        Will Glass-Husain added a comment -

        Found this old issue. Thanks for suggesting it. If you are still interested, I'd be willing to commit this if you could write a unit test and documentation.

        If you want a simpler way to contribute, you might put this into the Velocity wiki at
        http://wiki.apache.org/jakarta-velocity/ContributedCode

        Show
        Will Glass-Husain added a comment - Found this old issue. Thanks for suggesting it. If you are still interested, I'd be willing to commit this if you could write a unit test and documentation. If you want a simpler way to contribute, you might put this into the Velocity wiki at http://wiki.apache.org/jakarta-velocity/ContributedCode

          People

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

            Dates

            • Created:
              Updated:

              Development