Uploaded image for project: 'Codehaus Cargo'
  1. Codehaus Cargo
  2. CARGO-479

Improve DefaultAntTaskFactory so that it can create Ant tasks for tasks requiring a valid Ant Target object

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: Core
    • Labels:
      None

      Description

      From the mailing list:

      my name is Petar Tahchiev, and I have been working with the cactus-ant-tasks integration with Cargo lately. The problem is that I want to use cargo's DefaultAntTaskFactory
      but it has only one constructor that accepts ant's Project object. In that constructor you set the project instance variable, and all of the instance variables get initialized with some default values. Specifically you instantiate new Target(); The probblem comes when one tries to use the DefaultAntTaskFactory to create "antcall" task, because in the ant API the target's name is tested to see if the <antcall> task is executed within some target. So since you create the target via new Target(), the name of the target is never initialised and stays null, forever. Thus a null-pointer exception is thrown.

      In the RunServerTests cactus task, we use only antcalls. In the cactus API (Vincent surely knows what I am so desparately trying to explain ) we also have a DefaultAntTaskFactory. So my idea is to replace ours with the one you gyus provide.

      To summon up my wish is to look at the patch I supply with this email and tell me: is it possible to add another constructor to the DefaultAntTaskFactory with the following syntacsis:
      public DefaultAntTaskFactory(Project theProject,
      String theCurrentTaskName, Location theCurrentLocation,
      Target theCurrentTarget)

        Gliffy Diagrams

          Attachments

            Activity

            There are no comments yet on this issue.

              People

              • Assignee:
                vincentmassol Vincent Massol
                Reporter:
                petartahchiev Petar Tahchiev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: