To summarize my experiences so far:
1. I have a travis ci build that does maven snapshot deploys using ftp
to a directory on the same server where karaf is running.
2. I serve the maven repository area out with HTTP and HTTPS using
nginx.
3. I added the maven repository served out by nginx like so:
config:edit org.ops4j.pax.url.mvn
config:property-append org.ops4j.pax.url.mvn.repositories ",
https://maven.bang.priv.no/repository/@snapshots,
http://maven.vaadin.com/vaadin-addons"
config:property-set org.ops4j.pax.url.mvn.globalUpdatePolicy always
config:update
4. After this, I could install my webapp with these commands:
feature:repo-add mvn:no.priv.bang.ukelonn/ukelonn.karaf/LATEST/xml/features
feature:install ukelonn-db-postgresql
feature:install ukelonn
bundle:watch *
5. After this, the webapp started and run
6. I did a new travis-ci build that deployed a new snapshot version
into the maven repository
7. The snapshot changes weren't picked up automatically by karaf
(ie. "bundle:watch *" had no effect)
8. Giving the command "bundle:update" for each bundle made the bundles
reload from the new snapshot:
bundle:update no.priv.bang.ukelonn.api
bundle:update no.priv.bang.ukelonn.db.liquibase
bundle:update no.priv.bang.ukelonn.db.postgresql
bundle:update no.priv.bang.ukelonn
9. I uninstalled and reinstalled karaf to start with a clean slate
10. I added the repository where travis-ci deploys the snapshots with a
file URL (since it is on the same machine as karaf is running)
config:edit org.ops4j.pax.url.mvn
config:property-append org.ops4j.pax.url.mvn.repositories ",
file:///usr/local/www-maven/repository/@snapshots,
http://maven.vaadin.com/vaadin-addons"
config:property-set org.ops4j.pax.url.mvn.globalUpdatePolicy always
config:update
11. I reinstalled my webapp, this time from the "file:" repository
feature:repo-add mvn:no.priv.bang.ukelonn/ukelonn.karaf/LATEST/xml/features
feature:install ukelonn-db-postgresql
feature:install ukelonn
bundle:watch *
12. I deployed a new maven snapshot version to the "file:" repository
from a travis-ci build
13. At the time of writing its approximately 30 minutes since the
travis-ci job completed, but karaf hasn't loaded any new snapshots
yet, so "bundle:watch *" doesn't seem to work for snapshots that are
loaded from a "file:" maven repository, that isn't the maven local
repository