1 Reply Latest reply on Jun 29, 2012 10:04 AM by Ulhas Bhole

    Deploy file into 'etc' with bundle?

    paul berry Newbie



      I'm pretty new to OSGi / maven and I'm trying to do something that's probably incredible simple but I can't work it out.


      Basically I want to deploy a file (a configuration file) with my bundle and have it end up in servicemix's 'etc' directory.


      Is this do-able?


      Edited by: paul.berry on Jun 29, 2012 1:49 PM

        • 1. Re: Deploy file into 'etc' with bundle?
          Ulhas Bhole Novice

          No I don't think this can happen unless you have some code in bundle that does it by intention.


          Normally, anything you have in bundle that's being deployed will be in internal data folder of Fuse ESB. If you need to do what you expect to do I suggest either do it as part of the bundle but then It might not get picked up first time from etc folder. Other option is to automate using scripting. So simply write a shell script that uses a client access from Fuse ESB or ssh to deploy your bundle and make sure in that script the shell command copies your file from some  location to Fuse ESB's etc folder.


          If you need that configuration in that one bundle it should be on bundle classpath anyway no need to do this copy in that case. If you expect it to be used by multiple bundles or want it on container classpath then you need it in etc folder.


          --Ulhas Bhole


          Edited by: ubhole on Jun 29, 2012 2:03 PM