Uploaded image for project: 'Ivy'
  1. Ivy
  2. IVY-87

static reference to ant project in fr.jayasoft.ivy.util.Message causes NullPointerException in environments like netbeans

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.2
    • Fix Version/s: 1.3-RC1
    • Component/s: Ant, Core
    • Labels:
      None
    • Environment:

      Windows XP, Java 1.5, NetBeans 4.1 (5.0 beta), Ant 1.6.5

      Description

      i'am using ivy 1.2a with netbeans. Running the buildlist task works fine for the first time but after run once the task causes a NullPointerException.

      The reason is the following snippet from fr.jayasoft.ivy.ant.IvyTask:

      protected void ensureMessageInitialised() {
      if (!Message.isInitialised())

      { Message.init(new AntMessageImpl(getProject())); }

      }

      NetBeans starts Ant always within the same VM and fr.jayasoft.ivy.util.Message references statically an "old" Ant project. No buildlisteners are registered to the "old" project object anymore and so a call Project.log causes a NullPointerException.

      Please remove this static dependency because NetBeans + Ivy is really cool - when it works...

        Attachments

          Activity

            People

            • Assignee:
              xavier Xavier Hanin
              Reporter:
              keil Keil Marx
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: