You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Travis Klotz <tr...@gmail.com> on 2011/07/22 16:59:23 UTC
Application Developer Setup
So what are developers that are building applications that will run in
Karaf using for a development environment? I'm going to be building a
fairly large number of camel based OSGi bundles that will be running
in Karaf. Up to this point I have been building simple apps in
eclipse, installing a bundle into my local maven repository and then
starting up an external copy of Karaf and installing/updating the
bundle using a mvn:XXXXX url. For my experiments this has worked
well enough, but it is a bit of a long feedback loop. What are other
people doing for an application development setup? Is there any way
to not have to leave eclpse or wait for a full maven build for each
build/deploy iteration?
Thanks,
Travis
Re: Application Developer Setup
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Travis,
the way I usually do this is to develop the camel routes with certain
Junit tests
that do the job of testing the core functionality of my routes.
A "simple" Integration test inside Karaf can be already done
by "simply" droping your xml camel route (if you use spring or blueprint)
inside the deploy folder of karaf.
Now if you have "lots" of bundles you are able to use the def:watch command
in the karaf shell to tell karaf that it should monitor the maven
repository for changes.
so next time you do a maven clean install your bundles are automatically
loaded in
your karaf container.
In case you are wondering how you get the dev:watch command done everytime
you restart your karaf you might consider writing a karaf-script which
can be
loaded in the shell.
Regards, Achim
Am 22.07.2011 16:59, schrieb Travis Klotz:
> So what are developers that are building applications that will run in
> Karaf using for a development environment? I'm going to be building a
> fairly large number of camel based OSGi bundles that will be running
> in Karaf. Up to this point I have been building simple apps in
> eclipse, installing a bundle into my local maven repository and then
> starting up an external copy of Karaf and installing/updating the
> bundle using a mvn:XXXXX url. For my experiments this has worked
> well enough, but it is a bit of a long feedback loop. What are other
> people doing for an application development setup? Is there any way
> to not have to leave eclpse or wait for a full maven build for each
> build/deploy iteration?
>
> Thanks,
>
> Travis
--
--
*Achim Nierbeck*
Apache Karaf<http://karaf.apache.org/> Committer& PMC
OPS4J Pax Web<http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer& Project Lead
blog<http://notizblog.nierbeck.de/>
Re: Application Developer Setup
Posted by Glen Mazza <gm...@talend.com>.
For greater efficiency, you may wish to convert to features (predefined
groupings of bundles):
http://karaf.apache.org/manual/2.2.2/users-guide/provisioning.html so
you can install one feature at once instead of installing
bundle-by-bundle. This will also speed up your redeployment process
because it's easy to quickly drop and reinstall/reactivate all bundles
making up a feature by using the up-and-down arrow keys (history keys)
within the Karaf console after Maven has finished installing the updated
bundles within your Maven repository.
Talend's open-source Integration Factory (providing a preconfigured wrap
of Camel & Karaf), in its examples download[1], maintains a separate
"features" project that holds the bundle information for each of the
examples--actually, same story with the examples in Talend Service
Factory (CXF) download. This design allows you to keep all features
configuration in a single place instead of with each subproject.
Eclipse should ideally just be for coding, as for not waiting for "the
full Maven build", I would look into modularizing your work so that a
Maven build of whatever subsystem you're working on won't take that much
time.
HTH,
Glen
[1] http://www.talend.com/download.php#IF (User Documentation and
Examples section).
On 07/22/2011 10:59 AM, Travis Klotz wrote:
> So what are developers that are building applications that will run in
> Karaf using for a development environment? I'm going to be building a
> fairly large number of camel based OSGi bundles that will be running
> in Karaf. Up to this point I have been building simple apps in
> eclipse, installing a bundle into my local maven repository and then
> starting up an external copy of Karaf and installing/updating the
> bundle using a mvn:XXXXX url. For my experiments this has worked
> well enough, but it is a bit of a long feedback loop. What are other
> people doing for an application development setup? Is there any way
> to not have to leave eclpse or wait for a full maven build for each
> build/deploy iteration?
>
> Thanks,
>
> Travis
--
Glen Mazza
Application Integration Division
Talend (http://www.talend.com/ai)
blog: http://www.jroller.com/gmazza
Re: Application Developer Setup
Posted by Raj Saini <ra...@gmail.com>.
Travis,
I found KarafEclipse plug
<http://stephen.evanchik.com/blog/2009/05/apache-felix-karaf-eclipse-pde.html>-in
<http://stephen.evanchik.com/blog/2009/05/apache-felix-karaf-eclipse-pde.html>
(http://stephen.evanchik.com/blog/2009/05/apache-felix-karaf-eclipse-pde.html)
useful. It provides a OSGi server runtime similar to the JEE server
runtime. All your workspace plug-ins are deployed automatically and you
may just to need to refresh your bundles after making changes to the source.
I had some difficulties in setting it up in the beginning. I am not sure
if it was due to older version of plugin or older version of Eclipse.
Following combination is working well for me:
Eclipse : 3.7 (RCP + JEE) on Ubuntu 11.04
Update site:
http://svn.codespot.com/a/eclipselabs.org/eik/trunk/features/info.evanchik.eclipse.karaf.update/
Thanks,
Raj
On Friday 22 July 2011 08:29 PM, Travis Klotz wrote:
> So what are developers that are building applications that will run in
> Karaf using for a development environment? I'm going to be building a
> fairly large number of camel based OSGi bundles that will be running
> in Karaf. Up to this point I have been building simple apps in
> eclipse, installing a bundle into my local maven repository and then
> starting up an external copy of Karaf and installing/updating the
> bundle using a mvn:XXXXX url. For my experiments this has worked
> well enough, but it is a bit of a long feedback loop. What are other
> people doing for an application development setup? Is there any way
> to not have to leave eclpse or wait for a full maven build for each
> build/deploy iteration?
>
> Thanks,
>
> Travis
>