Maven Ant Tasks
  1. Maven Ant Tasks
  2. MANTTASKS-26

artifact:dependencies filesetId attribute causes NPE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.6
    • Fix Version/s: 2.0.7
    • Component/s: dependencies task
    • Labels:
      None
    • Environment:
      Ant 1.6.5, Maven tasks for Ant 2.0.4, Solaris 10, Jdk 1.4.2_10

      Description

      Using the maven ant tasks I receive a null pointer if I set a fileset ref and then set a property with that ref.
      However if a set a path ref I do not get a NPE.

      I think is caused by the fileset not having its project set.
      If this is the case the following line needs to be added to the DependenciesTask:
      194d194
      < fileSet.setProject( getProject() );

      Exception:
      java.lang.NullPointerException
      at org.apache.tools.ant.types.AbstractFileSet.setupDirectoryScanner(AbstractFileSet.java:382)

      <!-- Script that fails -->
      <artifact:dependencies verbose="true"
      filesetId="maven.dependency.fileset"
      useScope="compile">
      <pom refid="maven.project.pom" />
      <localRepository refid="maven.local.repository" />
      </artifact:dependencies>
      <property name="my.fileset.property" refid="maven.dependency.fileset"/>

      <!-- Script that works -->
      <artifact:dependencies verbose="true"
      pathId="maven.dependency.path"
      useScope="compile">
      <pom refid="maven.project.pom" />
      <localRepository refid="maven.local.repository" />
      </artifact:dependencies>
      <property name="my.path.property" refid="maven.dependency.path"/>

      1. MNG-2304.patch
        0.6 kB
        Jeff Maxwell

        Activity

        Jeff Maxwell created issue -
        Jeff Maxwell made changes -
        Field Original Value New Value
        Attachment MNG-2304.patch [ 20638 ]
        John Casey made changes -
        Fix Version/s 2.0.5 [ 12294 ]
        kenneyw made changes -
        Fix Version/s 2.0.6 [ 13010 ]
        Fix Version/s 2.0.5 [ 12294 ]
        Jason van Zyl made changes -
        Fix Version/s 2.0.6 [ 13010 ]
        Fix Version/s 2.0.x [ 13141 ]
        Jason van Zyl made changes -
        Component/s Ant tasks [ 11532 ]
        Workflow Maven New [ 57072 ] jira [ 69356 ]
        Key MNG-2304 MANTTASKS-26
        Fix Version/s 2.0.x [ 13141 ]
        Affects Version/s 2.0.4 [ 12527 ]
        Project Maven 2 [ 10500 ] Maven 2.x Ant Tasks [ 11533 ]
        Brett Porter made changes -
        Workflow jira [ 69356 ] Maven New [ 69396 ]
        Jason van Zyl made changes -
        Fix Version/s 2.0.7 [ 13521 ]
        Affects Version/s 2.0.6 [ 13351 ]
        Jason van Zyl made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Hervé Boutemy made changes -
        Component/s dependencies task [ 12843 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 09:00:58 UTC 2015 [ 1428224458201 ]
        Mark Thomas made changes -
        Workflow jira [ 12716138 ] Default workflow, editable Closed status [ 12760081 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 22:08:22 UTC 2015 [ 1428271702400 ]
        Mark Thomas made changes -
        Workflow jira [ 12953453 ] Default workflow, editable Closed status [ 12990584 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development