Hello,

you can find a complete example in a project I have created on github at [1].

The interesting pieces are in the _blended-karaf-parent_ module where all the required plugins are configured. There is a sample container in the module_blended-karaf-demo_.

In the sample container you will find a directory src/main/resources/etc which holds replacement file for the etc directory if you wanted to change certain configs within the underlying karaf distro. Also, the setup uses the features-maven-plugin to prepopulate the system directory for offline usage.

Note, that this setup also creates an offline installer that does not require karaf to be running to use it. I have simply reused the karaf code that was executed within the shell command and repackeaged that
into an offline installer. Perhaps you do not require that functionality.

If of interest, there is a module that packages the outcome of the package outlined above into a docker image at _blended-docker/blended-docker-demo_. The intention is to be able to use that as a container within integration
tests.

An example integration test is in the module _blended/blended-akka-itest_.


Some preliminary documentation for the project is at [2], but I haven't found the time to write the docs for the packaging and integration tests. If you want to have a look at the latest build outputs to see what the maven build looks like, look at [3].

[1] https://github.com/woq-blended/blended
[2] http://www.wayofquality.de/projects/blended/index.html
[3] http://ci.wayofquality.de:8081/jenkins/

Best regards & Happy Hacking
Andreas

On 14/08/14 04:53, petertirrell wrote:
I'm a bit new to working with Karaf, but have set up locally a Karaf 3
installation (on Windows) and have developed an application consisting of a
number of OSGI bundles.  So now I want to move what I have set up to test
and production tier servers.  The thing is, these servers have no internet
connection enabled; they are internal only.

As part of my bundle requirements, I created a REST endpoint so I used the
feature repo and install for cxf and http.  When I tried this when setting
up on my test server it of course complained about not being able to
download the package.  Next I tried creating a kar archive of the cxf
feature, which appeared to work, except that when I drop that in the deploy
folder on the test server it still didn't work and complained about not
being able to find the maven URL for the package.

So ultimately, is there a definitive way I should be going about setting up
Karaf and my application (and dependencies) on a standalone server once I've
done my development?  I have the stock Karaf install, the cxf repo with cxf
and http features installed, probably a half dozen separate maven libraries
I had to add, and my application code.  I found the page about doing a
custom distribution
(http://karaf.apache.org/manual/latest/developers-guide/custom-distribution.html)
which maybe sounds like what I'm looking for, but do I ignore the deprecated
section? What is the most straightforward way to take an existing and
working karaf installation and set it up somewhere else when that
destination won't have Internet connectivity?

Thanks for any info,



--
View this message in context: 
http://karaf.922171.n3.nabble.com/How-to-transfer-Karaf-installation-and-setup-to-offline-server-tp4034760.html
Sent from the Karaf - User mailing list archive at Nabble.com.


--


   Andreas Gies

WoQ -- Way of Quality GmbH

Geschäftsführer & CTO

/eMail:/[email protected] <mailto:[email protected]>

/Tel:/ +49 151 23470823

/Fax:/ +49 1805 006534 2114

/Twitter:/ andreasgies /Skype:/ giessonic

/LinkedIn:/ <http://de.linkedin.com/pub/andreas-gies/0/594/aa5/> (http://de.linkedin.com/pub/andreas-gies/0/594/aa5/)

/Xing:/ <http://www.xing.com/profile/Andreas_Gies> (http://www.xing.com/profile/Andreas_Gies)

/Blog:/ <http://www.wayofquality.de/index.php/en/blog> (http://www.wayofquality.de/index.php/en/blog)

/Github:/ <https://github.com/atooni> (https://github.com/atooni)

/Amtsgericht Landshut:/HRB 8352//

//

/Ust.-Id.:/ DE274771254


     Haftungsausschluss

Diese Email kann vertrauliche und/oder rechtlich geschützte Informationen enthalten und ist ausschließlich für den/die benannten Adressaten bestimmt. Sollten Sie nicht der beabsichtigte Empfänger sein oder diese Email irrtümlich erhalten haben, ist es Ihnen nicht gestattet diese Mail oder einen Teil davon ohne unsere Erlaubnis zu verbreiten, zu kopieren, unbefugt weiterzuleiten oder zu behalten. Informieren Sie bitte sofort den Absender telefonisch oder per Email und löschen Sie diese Email und alle Kopien aus Ihrem System. Wir haften nicht für die Unversehrtheit von Emails, nachdem sie unseren Einflussbereich verlassen haben.


     Disclaimer

This email may contain confidential and/or privileged information and is intended solely for the attention and use of the named addressee(s). If you are not the intended recipient, or a person responsible for delivering it to the intended recipient, you are not authorized to and must not disclose, copy, distribute, or retain this message or any part of it without our authority. Please contact the sender by call or reply email immediately and destroy all copies and the original message. We are not responsible for the integrity of emails after they have left our sphere of control.

//

Reply via email to