I'm thinking about writing an OSGi plugin for karaf that can be
configured to watch a remote repository for snapshot updates.

The idea is to do something like this
 1. For each configured bundle, if the bundle has a snapshot version, intially 
do
    a. Get the maven coordinates
    b. Scan the configured repositories and chose the first repository
       that has the artifact
    c. Download the Repo-URL/groupId/artifactId/version/maven-metadata.xml
       and parse it to find the most recent snapshot, taking note of the
       maven repository, newest snapshot version, newest snapshot
       timestamp, as well as the update time of the maven-metadata.xml
       file
 2. Schedule a job that for each configured bundle, that:
    a. Does a conditional GET for the 
Repo-URL/groupId/artifactId/version/maven-metadata.xml
       file
    b. If the conditional GET receives content, parse the content and
       extract the snapshot version and timestamp and compare them with
       the save versions to see if they actually have changed
    c. If a new snapshot has arrived, tell the bundle to update

Right now I'm reading the Pax-URL documentation[1] trying to figure out
if it's possible to do step 1b.

Does anyone familiar with Pax-Url think this might be feasible? Or is
the actual repo used so hidden away that it is hard to do?

Thanks!


- Steinar

References:
[1] <https://ops4j1.jira.com/wiki/spaces/paxurl/pages/3833866/Mvn+Protocol>

-- 
-- 
------------------
OPS4J - http://www.ops4j.org - [email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to