karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@quarendon.net
Subject Re: Developing for karaf
Date Tue, 05 Sep 2017 12:25:19 GMT
OK, thanks.

I'm really actually quite passionate about this whole area. The OSGi community is too small
to fragment, and there's an excellent tool in the shape of bndtools (gradle based), but it
doesn't "deploy" to anything. It's just super frustrating that there's no clear integration
path between that and karaf (maven based). There would be an awesome environment if that could
be nailed, so that it operated a bit like developing j2ee webapps for a container like tomcat,
which seems roughly analogous (integration of running karaf within eclipse itself, automatic
deployment of the bundles into the container and so forth, along with the ease of build and
dependency configurations that bndtools has).

Anyway. I'll experiment with a "pure karaf" environment and see where it gets me. You've confirmed
my basic understanding of the current situation anyhow.

> On 05 September 2017 at 13:07 Jean-Baptiste Onofré <jb@nanthrax.net> wrote:
> 
> 
> Hi Tom,
> 
> You can also create your own Karaf custom distro.
> 
> We are also discussing about Karaf Boot to simplify the bootstrapping/ramp up on 
> Karaf. Short term, we are working on an improved dev guide.
> 
> Back on your question:
> 1. From a dev perspective, you can have a running karaf instance, you just do 
> mvn install on your bundle, and thanks to bundle:watch, it's automatically 
> updated in Karaf (not need to perform any command).
> 2. For debugging, you are right: just start karaf in debug mode (bin/karaf 
> debug), it binds port 5005 by default, and then, connect your IDE remotely.
> 
> Regards
> JB
> 
> On 09/05/2017 01:48 PM, tom@quarendon.net wrote:
> > I'm trying to get an idea of how people go about developing for karaf, from a practical
point of view.
> > 
> > So karaf is maven focused. There are archetypes for creating command, general bundles
and so on.
> > I can then use maven to generate some eclipse project files that allow me to write
and compile my code within eclipse. I guess if I need extra dependencies, I have to edit my
pom and hopefully eclipse picks this up (never really done serious maven development, so I
don't know how this process really works).
> > 
> > When I want to try something out, I have to perform a maven build, start up a copy
of karaf, install the bundle (or bundles) into it, then try out my new code? All from the
command line?
> > What about debugging? You start karaf with the "debug" option and then remotely
connect eclipse to the karaf instance so that you can then place breakpoints and step through
the code if necessary? Does it just magically find all the source code?
> > 
> > Just trying to get a picture of what the expected workflow is and whether I'm missing
anything. We're used to doing things in bndtools where you've got eclipse tooling for everything,
so I'm just trying to do a mental reset really on what a "karaf/maven centric" development
environment and process would look like. (I'm aware of the "Integrate Apache Karaf and Bnd
toolchain" article, but we've had limited success with it beyond simple "hello world" examples.
Maybe we just need more perseverance).
> > 
> > Thanks.
> > 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Mime
View raw message