Uploaded image for project: 'Karaf'
  1. Karaf
  2. KARAF-7803

It is not possible to use classpath configurations on either boot or startup features when using the karaf-maven-plugin

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.4.5
    • None
    • karaf
    • None

    Description

      Hello,

      As far as I can tell from the documentation and from several tries the karaf-maven-plugin is unable to correctly process karaf features that contain configuration blocks with classpath URLs, i.e.:

          <feature name="sling" version="${project.version}">
              <config external="true" name="org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-auth-core">classpath:org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-auth-core.cfg.json</config>
          <!-- ... -->
          </feature>
      

      If the feature "sling" is either a boot or startup feature (or referenced from one such feature) the build process always fails with this kind of message:

      [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:4.4.5:assembly (default-assembly) on project sling-overlays-distro: Unable to build assembly: Error:
      [ERROR]     Error downloading classpath:org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.amended~sling-scripting.cfg.json
      [ERROR] -> [Help 1]

      The only work around that works is to use config blocks with only felix cfg notation as JSON blocks are not converted to JSON files correctly (i.e. https://github.com/apache/karaf/pull/1725/ does not appear to work correctly) and factory configurations when using the new ~ notation appears also to be broken.

      What am I doing wrong?

      Best regards

      PS: For reference just clone the Sling Karaf stuff:

      And on the POM of this last one just move for example the sling feature from installed to boot.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cf_mgomes M. Gomes (Celfocus)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: