You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Ioan Eugen Stan <st...@gmail.com> on 2018/06/15 09:55:14 UTC
karaf feature `config` not getting bundled issue
Hello,
I'm working with Sling on top of Karaf and I have discovered an issue
that might be a bug.
My issue is that configuration files are not available for offline use
inside the custom karaf distribution.
We define configurations like:
<config external="true"
name="org.apache.sling.jcr.repoinit.RepositoryInitializer-sling_discovery">
mvn:org.apache.sling/org.apache.sling.karaf-configs/${project.version}/config/org.apache.sling.jcr.repoinit.RepositoryInitializer-sling_discovery
</config>
Now when we build the karaf distribution and install the feature, it
does not find the configuration files.
Steps to reproduce:
git clone https://github.com/netdava/sling-org-apache-sling-karaf.git
cd sling-org-apache-sling-karaf
echo "Update the version so we can replicate the issue easily"
VERSION=0.99.0 mvn versions:set -DnewVersion=${VERSION} -DartifactId='*'
echo "Create a custom distribution - do not install the bundles"
mvn clean package
echo "Unpack the distro"
tar xf
sling-org-apache-sling-karaf-distribution/target/org.apache.sling.karaf-distribution-0.99.0.tar.gz
echo "Start Karaf"
./org.apache.sling.karaf-distribution-0.99.0/bin/karaf
echo "Install feature and see it fail"
feature:install sling-tar-all
The feature fails to install because the config file referenced there
cannot be found. Any ideas on how to get around this? I've tried config
file but it seems to have some issue.
Regards,
Eugen
[1] https://github.com/netdava/sling-org-apache-sling-karaf-features
[2]
https://issues.apache.org/jira/browse/KARAF-4829?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=15948530#comment-15948530
Re: karaf feature `config` not getting bundled issue
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Ioan,
that's normal as it's a <config/>, not a <configfile/>.
By default, <config/> is in ConfigAdmin memory.
In your case, you should use <configfile/>.
Regards
JB
On 15/06/2018 11:55, Ioan Eugen Stan wrote:
> Hello,
>
> I'm working with Sling on top of Karaf and I have discovered an issue
> that might be a bug.
>
> My issue is that configuration files are not available for offline use
> inside the custom karaf distribution.
>
> We define configurations like:
>
> <config external="true"
>
> name="org.apache.sling.jcr.repoinit.RepositoryInitializer-sling_discovery">
>
> mvn:org.apache.sling/org.apache.sling.karaf-configs/${project.version}/config/org.apache.sling.jcr.repoinit.RepositoryInitializer-sling_discovery
> </config>
>
> Now when we build the karaf distribution and install the feature, it
> does not find the configuration files.
>
> Steps to reproduce:
>
> git clone https://github.com/netdava/sling-org-apache-sling-karaf.git
>
> cd sling-org-apache-sling-karaf
>
> echo "Update the version so we can replicate the issue easily"
>
> VERSION=0.99.0 mvn versions:set -DnewVersion=${VERSION} -DartifactId='*'
>
> echo "Create a custom distribution - do not install the bundles"
>
> mvn clean package
>
> echo "Unpack the distro"
>
> tar xf
> sling-org-apache-sling-karaf-distribution/target/org.apache.sling.karaf-distribution-0.99.0.tar.gz
> echo "Start Karaf"
>
> ./org.apache.sling.karaf-distribution-0.99.0/bin/karaf
>
> echo "Install feature and see it fail"
>
> feature:install sling-tar-all
>
>
> The feature fails to install because the config file referenced there
> cannot be found. Any ideas on how to get around this? I've tried config
> file but it seems to have some issue.
>
>
> Regards,
>
> Eugen
>
>
> [1] https://github.com/netdava/sling-org-apache-sling-karaf-features
>
> [2]
> https://issues.apache.org/jira/browse/KARAF-4829?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel&focusedCommentId=15948530#comment-15948530
>
>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com