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

ContentPackageScanner does not extract the right artifactId in case of multiple pom.properties

    XMLWordPrintableJSON

Details

    Description

      Currently, the ContentPackageScanner gets the first directory available under the maven meta-inf folder.

      This works most of the time, as there is usually only 1 properties file inside a package.

       

      However in some edge cases, there are multiple. And if the order is that in a way that a different package comes first, such as com.google.guava , it will take that one instead.

      Example we are extracting com.acs.aem.acs-aem-commons-content-5.4.3.zip > acs-aem-commons-bundle-5.3.4.jar

      The META-INF/maven folder contains:

      com.google.guava/failureaccess/pom.properties

      com.adobe.acs/acs-aem-commons-bundle/pom.properties

       

      Now, the first is picked, com.google.guava/failureaccess/pom.properties

       

      What we want is to build in a mechanism that if there are multiple maven properties, the contentpackagescanner will check if one of them has a groupId (first folder) that matches.

       

      Since the groupId com.adobe.acs is a match, we can use that to pick the right properties file.

       

      Attachments

        Issue Links

          Activity

            People

              cziegeler Carsten Ziegeler
              Sc0rpic0m Niek Raaijmakers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: