Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Auto Closed
    • None
    • None
    • dependencies task
    • None

    Description

      It appears that the type filter doesn't work properly with indirect dependencies. It doesn't look like an issue with the TypeArtifactFilter itself, but somewhere deeper. However, it's related to this feature, so here it is...

      The problem manifests with transitive dependencies that are of different type, e.g. a war artefact depends on a jar library. Whatever the type in that case (jar or war), the dependency list returned by artifact:dependencies is empty.

      I've traced through it and here is some more information:

      DefaultArtifactCollector applies the filter using ResolutionNode.filterTrail. This iterates over the (dependency) node trail and applies the specified filter to each dependency in turn. If all dependencies are of the same type and the type matches the one specified in the filter, no problems. However, I've got a dependency that is a war archive and that in turn has some jar dependencies. If type is set to jar, filter fails when testing the first dependency in the trail - the war in this case and never gets to the jar. The result is that whatever the value of the type attribute, the dependency list always ends up empty for trails that contain dependencies of different types.

      Attachments

        1. pom.xml
          0.6 kB
          Tomislav Bodor
        2. build.xml
          2 kB
          Tomislav Bodor

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tbodor Tomislav Bodor
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: