[
https://issues.apache.org/jira/browse/KARAF-5350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16160074#comment-16160074
]
Steinar Bang commented on KARAF-5350:
-------------------------------------
Using the approach I outlined above should avoid trying to load a bundle in the
middle of deployment:
* The listener would do HTTP conditional GETs on the relevant
maven-metadata.xml and would do nothing on [304 Not
Modified|https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#3xx_Redirection]
responses except for waiting the configured interval and doing a new
conditional GET
* When the listener received a 200 response it would parse the file and extract
the new snapshot and compare it with the previous snapshot
That means the listener would not try to update a bundle, until:
# It had successfully loaded the maven-metadata.xml file
# It had successfully parsed the loaded maven-metadata.xml file and extracted
the newest snapshot in the file
# The extracted snapshot was different from the current snapshot
But the above idea was what I had for my own listener component.
A karaf cave based solution might be different. I don't know much about the
capabilities of cave, but from what little I have read the best approach might
be to create a local maven snapshot repository in cave shadowing a remote
repository, and then have karaf watch that in a similar way to how it watches
the local repository...?
> Get auto update functionality like "bundle:watch *" on snapshot artifacts
> from remote repositories
> --------------------------------------------------------------------------------------------------
>
> Key: KARAF-5350
> URL: https://issues.apache.org/jira/browse/KARAF-5350
> Project: Karaf
> Issue Type: Improvement
> Reporter: Steinar Bang
>
> I now have a continous deployment pipeline for [my
> project|https://github.com/steinarb/ukelonn] almost automated:
> # All changes I would like deployed, I merge to master and then push master
> to github
> # New pushes on master triggers a build on travis-ci
> # A successful build on travis-ci results in a new snapshot being deployed to
> a maven repository accessible via HTTP
> ## The bundles that make up my application have been installed from snapshots
> in the maven repository, like so (karaf consolle commands):
> {noformat}
> 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
> feature:repo-add mvn:no.priv.bang.ukelonn/ukelonn.karaf/LATEST/xml/features
> feature:install ukelonn-db-postgresql
> feature:install ukelonn
> {noformat}
> # The final step I have to do during a deployment, is to log in with ssh to
> the karaf console and give "bundle:update" on each bundle
> {noformat}
> 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
> {noformat}
> It is the final step I would like to have automated, so that new snapshots
> deployed to the remote repository is automatically picked up by karaf.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)