Hi Johan,
for 2, yes Cave can act as a Maven repository. The same Cave repo can be
Maven repo (using the Maven structure) and OBR repo.
The cave user guide is there:
http://karaf.apache.org/manual/cave/latest/index.html
By the way, you should better ask this kind of questions on the Karaf
mailing list.
Regards
JB
On 02/25/2015 01:37 PM, Johan Ström wrote:
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 <[email protected]>:
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!
--
Jean-Baptiste Onofré
[email protected]
http://blog.nanthrax.net
Talend - http://www.talend.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]