You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Joerg Ehrlich <je...@adobe.com> on 2014/10/24 10:29:45 UTC

What is the best way to replace standard Karaf files with custom ones during assembly?

Hi,

while creating a Karaf assembly using the "karaf-assembly" Maven goal I would like to overwrite standard Karaf files (e.g. in bin or etc) with custom ones provided by project resources (i.e. src/main/resources). The current behavior (for ZIP and TAR) is that files with the same name both end up in the archive, i.e. it seems it is currently not possible to actually replace assembly files with project resources or the other way around.
There is one possible work-around using Maven resource plug-in to overwrite the files in assembly folder before karaf:instance-create-archive goal is invoked but that requires to move the files into a non-standard resource folder. Would be great to keep the default maven mechanisms in combination with Karaf plug-in.

Any recommendations how solve this?
Thanks
Jörg

Re: What is the best way to replace standard Karaf files with custom ones during assembly?

Posted by Oliver Pajonk <ol...@pjnk.de>.
Hi Joerg,

a few days ago I had a very related question. There is a ticket here
<https://issues.apache.org/jira/browse/KARAF-2742>which seems to track it,
and JB promised to update the documentation.

Hope that helps,
Oliver

2014-10-24 10:29 GMT+02:00 Joerg Ehrlich <je...@adobe.com>:

>  Hi,
>
>
>
> while creating a Karaf assembly using the “karaf-assembly” Maven goal I
> would like to overwrite standard Karaf files (e.g. in bin or etc) with
> custom ones provided by project resources (i.e. src/main/resources). The
> current behavior (for ZIP and TAR) is that files with the same name both
> end up in the archive, i.e. it seems it is currently not possible to
> actually replace assembly files with project resources or the other way
> around.
>
> There is one possible work-around using Maven resource plug-in to
> overwrite the files in assembly folder before
> karaf:instance-create-archive goal is invoked but that requires to move
> the files into a non-standard resource folder. Would be great to keep the
> default maven mechanisms in combination with Karaf plug-in.
>
>
>
> Any recommendations how solve this?
>
> Thanks
>
> Jörg
>