Groovy
  1. Groovy
  2. GROOVY-2900

Allow Ant targets declaration by AntBuilder without immediate execution.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6-beta-1
    • Fix Version/s: 2.4.0-beta-1
    • Component/s: Ant integration
    • Labels:
      None

      Description

      Currently it is not possible to use AntBuilder to declare targets without invoking them.
      When antBuilder.target(..)

      {...}

      is invoked, the target is executed immediately.
      This also makes difficult to declare targets complex with dependencies.

      It would be great if antBuilder.target

      {..}

      only created target without invoking it.
      Then it would be possible to invoke target after all configuration is done.

        Activity

        Sergey Bondarenko created issue -
        mguillem made changes -
        Field Original Value New Value
        Assignee Marc Guillemot [ mguillem ]
        Jochen Theodorou made changes -
        Component/s Ant integration [ 11711 ]
        Hide
        Pascal Schumacher added a comment -

        As this issue has not seen any updates for over four years I'm closing it. If it is still relevant please reopen. Thanks!

        Show
        Pascal Schumacher added a comment - As this issue has not seen any updates for over four years I'm closing it. If it is still relevant please reopen. Thanks!
        Pascal Schumacher made changes -
        Resolution Won't Fix [ 2 ]
        Status Open [ 1 ] Closed [ 6 ]
        Hide
        Sergey Bondarenko added a comment -

        I am still interested in resolving this issue. It seems more convenient to follow Ant behavior and not to execute a target when it is declared.

        If the user simply wants to execute set of Ant tasks, he will not need a target. If he needs a target, he 100% does not need to execute it immediately - the user wants to define a graph of targets first.

        Show
        Sergey Bondarenko added a comment - I am still interested in resolving this issue. It seems more convenient to follow Ant behavior and not to execute a target when it is declared. If the user simply wants to execute set of Ant tasks, he will not need a target. If he needs a target, he 100% does not need to execute it immediately - the user wants to define a graph of targets first.
        Sergey Bondarenko made changes -
        Resolution Won't Fix [ 2 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Pascal Schumacher made changes -
        Assignee Marc Guillemot [ mguillem ]
        Hide
        Pascal Schumacher added a comment -

        You are welcome to suggest solutions and create pull request if you have any ideas how to solve this.

        Show
        Pascal Schumacher added a comment - You are welcome to suggest solutions and create pull request if you have any ideas how to solve this.
        Paul King made changes -
        Assignee Paul King [ paulk ]
        Hide
        Paul King added a comment -

        Proposed fix:
        https://github.com/groovy/groovy-core/pull/438

        This leaves "target" as executed immediately (for backwards compatibility) but if you use "defineTarget", execution is deferred. See the test case for an example.

        Show
        Paul King added a comment - Proposed fix: https://github.com/groovy/groovy-core/pull/438 This leaves "target" as executed immediately (for backwards compatibility) but if you use "defineTarget", execution is deferred. See the test case for an example.
        Paul King made changes -
        Fix Version/s 2.4.0-beta-1 [ 20369 ]
        Cédric Champeau made changes -
        Fix Version/s 2.4.0-beta-2 [ 20433 ]
        Fix Version/s 2.4.0-beta-1 [ 20369 ]
        Hide
        Pascal Schumacher added a comment -

        @Paul: Your pull request was merged, so I'm resolving this.

        Show
        Pascal Schumacher added a comment - @Paul: Your pull request was merged, so I'm resolving this.
        Pascal Schumacher made changes -
        Resolution Fixed [ 1 ]
        Fix Version/s 2.4.0-beta-2 [ 20433 ]
        Fix Version/s 2.4.0-beta-1 [ 20369 ]
        Status Reopened [ 4 ] Resolved [ 5 ]
        Hide
        Paul King added a comment -

        Thanks!

        Show
        Paul King added a comment - Thanks!
        Paul King made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12731918 ] Default workflow, editable Closed status [ 12743664 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12969792 ] Default workflow, editable Closed status [ 12977555 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        1703d 7h 44m 1 Pascal Schumacher 10/Feb/13 11:27
        Closed Closed Reopened Reopened
        43d 5h 52m 1 Sergey Bondarenko 25/Mar/13 17:20
        Reopened Reopened Resolved Resolved
        442d 19h 1m 1 Pascal Schumacher 11/Jun/14 13:21
        Resolved Resolved Closed Closed
        2h 3m 1 Paul King 11/Jun/14 15:25

          People

          • Assignee:
            Paul King
            Reporter:
            Sergey Bondarenko
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development