>>>>> Steinar Bang <[email protected]>:
>>>>> Guillaume Nodet <[email protected]>:

>> Fwiw, bundle:watch is very specific and only check the local repository, so
>> it won't work if you upload a new snapshot on a remote repository.

> I was sort of hoping it would work for a different maven repo in the
> local file system, which is what I currently have.

I tried one (actually two experiments):
 1. Made the repository deployed to by travis-ci karaf's local
    repository. 
    Using the same local repository as maven builds worked when I tried
    it out on my development machine (after I had made the repository
    writable by karaf).
    But it failed when using the repository deployed to by travis-ci on
    my production machine, because karaf was unable to recognize the
    deployed snapshots as snapshots in the local repository (actual
    repositories have a different snapshot structure to the local
    repository)

 2. Since I was in experimentation mode I tried making the repository
    are both the local repository and added it as a repository, like so:
     config:edit org.ops4j.pax.url.mvn
     config:property-set org.ops4j.pax.url.mvn.localRepository 
/var/www-maven/repository
     config:property-append org.ops4j.pax.url.mvn.repositories ", 
file:///var/www-maven/repository, http://maven.vaadin.com/vaadin-addons";
     config:update

    But this made karaf terribly confused:
     karaf@root()> feature:repo-add 
mvn:no.priv.bang.ukelonn/ukelonn.karaf/LATEST/xml/featuresAdding feature url 
mvn:no.priv.bang.ukelonn/ukelonn.karaf/LATEST/xml/features
     Error executing command: Error resolving artifact 
no.priv.bang.ukelonn:ukelonn.karaf:xml:features:1.0.0-SNAPSHOT: [Could not 
transfer artifact 
no.priv.bang.ukelonn:ukelonn.karaf:xml:features:1.0.0-SNAPSHOT from/to 
repo_1276108016 (http://artifactory.lampiris.be/remote-repos/): 
artifactory.lampiris.be, Could not find artifact 
no.priv.bang.ukelonn:ukelonn.karaf:xml:features:1.0.0-SNAPSHOT in apache 
(http://repository.apache.org/content/groups/snapshots-group/), Could not find 
artifact no.priv.bang.ukelonn:ukelonn.karaf:xml:features:1.0.0-SNAPSHOT in 
sonatype.snapshots.deploy 
(https://oss.sonatype.org/content/repositories/snapshots/), Could not find 
artifact no.priv.bang.ukelonn:ukelonn.karaf:xml:features:1.0.0-SNAPSHOT in 
ops4j.sonatype.snapshots.deploy 
(https://oss.sonatype.org/content/repositories/ops4j-snapshots/), Could not 
find artifact no.priv.bang.ukelonn:ukelonn.karaf:xml:features:1.0.0-SNAPSHOT in 
spring-ebr-repository 
(http://repository.springsource.com/maven/bundles/external/)] : 
mvn:no.priv.bang.ukelonn/ukelonn.karaf/LATEST/xml/features
     karaf@root()>

(I didn't expect the second experiement to work. I just tried it out to
see what would happen...:-) )

So now I'm back to running with the https-URL pointing to the travis-ci
deployment repository added to the mvn.repositories setting:
 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

So, no success yet at totally automating the deployment from a
travis-ci build.  

I still need to to "bundle:update" from the karaf console on each bundle
I want updated after a new snapshot has been added.

Reply via email to