Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
4.4.5
-
None
-
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:
- https://github.com/apache/sling-org-apache-sling-karaf-configs
- https://github.com/apache/sling-org-apache-sling-karaf-features
- https://github.com/apache/sling-org-apache-sling-karaf-distribution
And on the POM of this last one just move for example the sling feature from installed to boot.