Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10501

The analyser scanner should pass the artifact url to the resource builder

    XMLWordPrintableJSON

Details

    Description

      When the scanner is parsing artifacts it uses the ResourceBuilder from Felix but doesn't give it the url of the artifact. That makes it so that if the artifact can not be parsed (e.g. because it has invalid metadata) an exception is thrown that doesn't give any indication of the artifact that caused it.

      Looks like this:

      org.osgi.framework.BundleException: Unable to build resource for null: Duplicate import: foo
      

      The scanner should pass the artifact url at [0] to the Resourcebuilder so that the exception contains the artifact id.

      [0] https://github.com/apache/sling-org-apache-sling-feature-analyser/blob/89d5544fbc86adf6b5a99f7a2cb96055dcb3b3d1/src/main/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java#L227

      Attachments

        Activity

          People

            cziegeler Carsten Ziegeler
            karlpauls Karl Pauls
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: