pnoltes commented on pull request #325:
URL: https://github.com/apache/celix/pull/325#issuecomment-789066243


   > I'm missing a rationale for why fat jars/zips are a feature celix would 
want. Is this related to the issue with cache directories?
   
   One of the use case I am struggling with is how to make it possible for 
Celix users to "just install a application" which uses Celix.
   
   If you use Celix to create a nice application (e.g. myapp) which uses 
different bundles. You can install the bundles, but not really the executable 
created with the cmake function `add_celic_container`.
   
   When starting the installed executable (e.g. /usr/local/bin/myapp) it needs 
to find the bundles. This can be achieved by the config property 
CELIX_BUNDLES_PATH.. but this needs to be done with env after the executable is 
installed. Because during install you probably not known which 
CELIX_BUNDLES_PATH are valid (-> e.g. where will the different bundles be 
installed).
   
   If it possible to create a "fat celix executable" with something like:
   ```
   add_celix_container(myapp
     FATEXE #maybe not the best  name  ... ;)
     BUNDLES Celix::ShellCxx Celix::shell_tui MyBundle
   )
   ```
   where the bundle zip are embedded in the executable you can avoid this 
issues. 
   
   Of course a different path could be to add support for bundles a shared 
libraries instead, but can this be done backwards compatible and do we need to 
update all Celix bundles as shared library then or provide 2 version (1 as zip 
bundle and 1 as shared library). 
   
   An other issues is also indeed the cache directory, because if you install a 
celix executable (e.g. /usr/local/bin/myapp) it will now create cache dir in 
the location where you start the executable. IMO this should be a /tmp or spool 
dir, but this will also mean that the celix application needs to clean its own 
(and maybe other not running celix executable) cache dirs. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to