You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Martin Stiborský <ma...@gmail.com> on 2013/02/27 20:48:50 UTC

Packaging camel project (under Karaf)

Hello guys,
I'm wondering, how you are packaging yours Camel projects under Karaf?
Sure, I found and used this:
https://cwiki.apache.org/confluence/display/KARAF/6.2.+Custom+distributions
Good thing, I'm able to create a tarball package.
Actually, we need to package Apache Karaf, with all dependencies, like
Camel, various libraries plus our own bundles with Camel routes, etc - and
package it as a RPM package.

The problem is mainly with our own code/artifacts. On various environment,
there might be not a internet access at the moment, and for sure there will
be no chance to download our artifacts from our Maven.
So all of these have to prepackaged.
I can use the tarball package created by Maven, following the howto
mentioned above, extract the tarball, start Karaf in our environment, with
access to Maven, let it download all things it needs (features.xml for our
project), then stop it, package it again and make a RPM from that.

But I don't like this manual part I have to do :( At least for our camel
bundles I can just place them into "deploy/" directory, but what to do with
all the libraries? There I'd like to rather utilize
Karaf's org.apache.karaf.features.cfg and list there all features I need to
install. For the libraries, I have them all specified in features.xml, so
In Karaf I can just "features:install my-project-libs" and job is done.

So, do you know some trick, how to automate it even better? How to
eliminate the manual part with starting Carafe and repackaging to get it
really ready?


-- 
S pozdravem / Best regards
Martin Stiborský

Jabber: stibi@njs.netlab.cz
Twitter: http://www.twitter.com/stibi

Re: Packaging camel project (under Karaf)

Posted by Henryk Konsek <he...@gmail.com>.
Hi Martin,

> On various environment,
> there might be not a internet access at the moment, and for sure there will
> be no chance to download our artifacts from our Maven.
> So all of these have to prepackaged.

What about creating local Maven repository? You can tell Karaf to read
from any repo you want, not necessarily remote one. Maven Dependency
plugin and its go-offline mojo [1] could be very useful here.

Best regards.

[1] http://maven.apache.org/plugins/maven-dependency-plugin/go-offline-mojo.html

--
Henryk Konsek
http://henryk-konsek.blogspot.com

Re: Packaging camel project (under Karaf)

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

you probably should try to build your own features file and use it in
conjunction with the maven-karaf-features plugin to
create your own pre-packaged Karaf distribution.
Unfortunately since our change to svn-pub-sub the documentation disappeared
I would have given you some
direct links to the online documentation :/
But if you search for "Custom distributions" in the available manual at
[1].
There is a sample on how to do this.

regards, Achim

[1] -
http://repo.maven.apache.org/maven2/org/apache/karaf/manual/2.3.0/manual-2.3.0.html




2013/2/27 Martin Stiborský <ma...@gmail.com>

> Hello guys,
> I'm wondering, how you are packaging yours Camel projects under Karaf?
> Sure, I found and used this:
> https://cwiki.apache.org/confluence/display/KARAF/6.2.+Custom+distributions
> Good thing, I'm able to create a tarball package.
> Actually, we need to package Apache Karaf, with all dependencies, like
> Camel, various libraries plus our own bundles with Camel routes, etc - and
> package it as a RPM package.
>
> The problem is mainly with our own code/artifacts. On various environment,
> there might be not a internet access at the moment, and for sure there will
> be no chance to download our artifacts from our Maven.
> So all of these have to prepackaged.
> I can use the tarball package created by Maven, following the howto
> mentioned above, extract the tarball, start Karaf in our environment, with
> access to Maven, let it download all things it needs (features.xml for our
> project), then stop it, package it again and make a RPM from that.
>
> But I don't like this manual part I have to do :( At least for our camel
> bundles I can just place them into "deploy/" directory, but what to do with
> all the libraries? There I'd like to rather utilize
> Karaf's org.apache.karaf.features.cfg and list there all features I need to
> install. For the libraries, I have them all specified in features.xml, so
> In Karaf I can just "features:install my-project-libs" and job is done.
>
> So, do you know some trick, how to automate it even better? How to
> eliminate the manual part with starting Carafe and repackaging to get it
> really ready?
>
>
> --
> S pozdravem / Best regards
> Martin Stiborský
>
> Jabber: stibi@njs.netlab.cz
> Twitter: http://www.twitter.com/stibi
>



-- 

Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
OPS4J Pax for Vaadin <http://team.ops4j.org/wiki/display/PAXVAADIN/Home>
Commiter & Project Lead
blog <http://notizblog.nierbeck.de/>