you can use Pax Exam for that and start Karaf embedded, this will give
you a clean state for every run.
The other way would be to have a Karaf with Jolokia running and deploy via
JMX, I once created a sample for that .
 - https://ops4j1.jira.com/wiki/display/PAXEXAM4/Pax+Exam
2016-09-20 9:05 GMT+02:00 <t...@quarendon.net>:
> What's the best way of deploying an application from a CI build such as
> into Karaf, for the purposes of testing?
> I was hoping to set something up so that I have a jenkins job that builds
> application and then deploys the built application to a test instance on
> The karaf would be running on a separate machine, so I would most likely
> write a
> simple piece of java, either as an ANT task or similar that uses the JMX
> management bean interface to interact with karaf (seems more reliable than
> trying to script the shell interface and detect errors).
> My question really is what the best was of transferring things was.
> Naively I
> assumed that I would publish the artifacts into artifactory as snapshots
> then pull them from there using mvn: URLs, but maybe I just don't know
> about how maven repositories work, as I'm getting into difficulties with
> artifacts being cached, so that what is deployed is what has just been
> I could probably pull them directly from jenkins using the
> "lastSuccessfulBuild/artifacts" URLs, and maybe that the best way?
> Any thoughts?
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
Software Architect / Project Manager / Scrum Master