Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25020

The extension descriptors generated by the Docker test framework don't contain the JAR classifier

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      The Docker based functional test framework builds its own WAR and generates the .xed extension descriptor of each JAR itself, in WARBuilder#generateXEDForJAR:

      File targetXEDFile =
          new File(targetDirectory, artifact.getArtifactId() + '-' + artifact.getBaseVersion() + ".xed");
      

      The Maven classifier is not part of the generated name, while the core extension scanner looks for a descriptor named exactly like the JAR it describes (it takes the JAR URL, removes the extension and appends .xed, see DefaultCoreExtensionScanner#loadCoreExtensionFromXED). As a result no descriptor is found for any JAR with a classifier. For example in the WAR built for xwiki-platform-image-lightbox-test-docker:

      • guice-4.2.1-no_aop.jar (only guice-4.2.1.xed is generated)
      • netty-tcnative-boringssl-static-2.0.81.Final-linux-x86_64.jar and the 4 other platform variants
      • netty-transport-native-epoll-4.1.137.Final-linux-x86_64.jar
      • xmlresolver-6.0.23-data.jar

      XWiki then falls back to guessing the extension from the META-INF/maven///pom.xml embedded in the JAR, which produces a wrong extension id when that POM is not the resolved one.

      The standard WAR is not affected: the xwiki-commons-tool-extension-plugin WAR goal has been generating artifactId-baseVersion[-classifier].xed since XCOMMONS-1486.

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              tmortagne Thomas Mortagne
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: