Hi, I'd give it a try, if something fails for you, ask at the karaf users ml :-) regarding step 2, I think you're right this will fail but if you populate your repo in 3. all bundles are known in 4 and available.
The link for the users guide can easily found at the left in the menu Cave-> Documentation (HTML) -> [1] regards, Achim [1] - http://karaf.apache.org/manual/cave/latest/index.html 2015-02-25 13:37 GMT+01:00 Johan Ström <jo...@stromnet.se>: > Hi, > > let's see if understand this correct. The OBR resolver would allow me to > write a super-simple feature file which just points to my main bundle, > and then the OBR resolver will ask the OBR repo to resolve all deps? If > so, that would certainly remove one headache (populating feature files > with all dep bundles). Although if all files are in the repo, I would > not need a features file at all (just obr:start <main-bundle>). > > To populate the repo, would the following work? > 1. Set up cave "Repository proxy" for i.e. maven central > 2. Tell my gradle script to use the cave server as a dependency > repository (this means that Cave would automatically download and index > all my deps) > 3. Let gradle install my own bundles into a local maven repo, which Cave > uses as backend. > 4. All bundles are now in cave and available through OBR. > > Not sure about step 2; I don't think Cave can act as a maven repo, nor > can Gradle use an OBR repo.. So that plan probably fails at that step.. > If not, how would I got about to populate the cave repo, without > manually having to specifying each dep (as user guide says, mirroring > whole of maven isn't a good idea..:))? > > Btw, http://karaf.apache.org/index/subprojects/cave.html mentions " Take > a look on the user guide.". I had to google to actually find that user > guide. > > Thanks > Johan > > On 25/02/15 08:35, Achim Nierbeck wrote: > > Hi, > > > > just for information. If you combine Karaf with the Karaf subproject Cave > > you receive a OBR server. > > This way you can use a Karaf+Cave server as a central OBR server. It'll > > automatically convert all maven coordinates to OBR. > > Together with the OBR resolver in Karaf (as additional bundle) you can > use > > your feature files right away. > > The OBR resolver will do the resolving for you from the OBR server > > (Karaf+Cave). > > > > > > Regards, Achim > > > > 2015-02-25 8:24 GMT+01:00 Johan Ström <jo...@stromnet.se>: > > > >> Hi, > >> > >> while not strictly a Felix question, I'd like to crosspost a question I > >> have regarding Gradle, OSGi and OBR here, as I hope there might be > >> someone out there who has a good answer.. :) > >> > >> (Originally posted on: > >> > >> > http://stackoverflow.com/questions/28698190/gradle-osgi-and-obr-or-other-repository > >> ) > >> > >> Previously I've been using Maven and the maven-bundle-plugin to archive > >> the following: > >> > >> When doing mvn install, local maven repo contains my bundle + all my > >> bundle's deps automatically > >> * Local repo becomes OBR repository by mvn bundle:index, also > >> repository.xml is automatically updated with every mvn install. > >> * Local repo can now be used for Karaf bundle deployment > >> Now, I'm looking to migrate some projects to Gradle, which is very nice > >> in many ways. I'm successfully creating bundles using the > >> 'org.dm.bundle' plugin (basic 'osgi' plugin did not allow me to > >> auto-create service components). > >> > >> By using Gradle's maven plugin I can do gradle install to install my own > >> bundle in local maven repo. I could then use bindex to manually (or > >> through some gradle hacking) index the repo. However, my dependencies > >> are not put into the maven repo, they are only stored in the gradle > >> cache dir. Thus, I can not use the OBR repo to deploy in Karaf yet. > >> > >> I've been looking around a lot trying to find some good solution to > >> this, but I have not found anything. > >> > >> I've looked at Karaf feature files, which would allow me to specify mvn > >> URLs directly instead of relying on OBR, but I'd like to avoid messing > >> with feature files manually, or all together if possible. > >> > >> There are references to using Nexus, but only Nexus Pro supports OBR > >> from what I can see? > >> > >> I'm up for suggestions on alternative solutions as well; the main goal > >> is that I shall be able to deploy my bundles + deps in Karaf. Maven does > >> not have to be used at all really, although I need some way for > >> different Gradle projects to find dependencies from some other projects > >> (which are not part of the same multi-project). > >> > >> Any ideas or discussions to put me on the right track is appreciated! > >> > >> > >> Thanks! > >> > > > > > > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master