I am using Apache Karaf as an OSGi container. Karaf has a url wrapper that can install packages directly from the maven repository.
> install mvn:com.farpost.billing/background-service/2.2-SNAPSHOT
Bundle ID: 139
Everything works perfectly. But I want to run several packages from this source. It makes sense if a new package sometimes interrupts production service and I want a rollback. With OSGi, it is very simple.
> list
[ 139] [Active ] [ ] [Started] [ 60] Billing background service (2.2-20100811-1232)
[ 140] [Resolved ] [ ] [ ] [ 60] Billing background service (2.2-20100809-1127)
> update 140
> list
[ 139] [Active ] [ ] [Started] [ 60] Billing background service (2.2-20100811-1232)
[ 140] [Resolved ] [ ] [ ] [ 60] Billing background service (2.2-20100812-1354)
> start 140
> stop 139
> list
[ 139] [Resolved ] [ ] [ ] [ 60] Billing background service (2.2-20100811-1232)
[ 140] [Active ] [ ] [Started] [ 60] Billing background service (2.2-20100812-1354)
#################
# suppose we need to rollback here
#################
> start 139
> stop 140
The problem is that I cannot create multiple packages from the same source:
> install mvn:com.farpost.billing/background-service/2.2-SNAPSHOT
Bundle ID: 139
> install mvn:com.farpost.billing/background-service/2.2-SNAPSHOT
Bundle ID: 139
The second call installdoes nothing but return an existing package identifier. So my question is, is there a way to create multiple packages from the same source URL?