1
votes

When installing bundles into apache sling (built on apache felix) I had some spring dependencies that were not in sling/felix. I manually found and installed them all, but there must be a better, automatic, way of doing this.

I found documenatation on the OSGi Bundle Repository (OBR) online, and the OSGi Repository tab in the felix web console. The OBR seems to be the way sling/felix resolves dependencies automatically like maven and a maven repo does for maven builds. My understanding is that the protocol used by the OBR is different from that used by maven repos however.

I've tried to add all the urls for public OBRs (http://felix.apache.org/site/apache-felix-sigil-obr.html) using the felix OSGi Repository tab (eg http://www.osgi.org/obr/browse?cmd=repository&_xml=1 and clicked 'add') and either got a simple AJAX Error "The request failed: OK" (sling) or an http 500 connection refused (felix):

HTTP ERROR 500

Problem accessing /system/console/obr. Reason: Connection refused: connect Caused by: java.net.ConnectException: Connection refused: connect

I tried adding it in a comma separated list in the felix conf/config.properties file without success.

Is my understanding about the proper approach for how bundles are resolved in felix/sling is to use the OBR correct?

Has anyone gotten this to work? How do I get it to work?

1
I did get it to accept file:///C:/Users/<my user name>/.m2/repository/repository.xml, and after clicking 'search' a bunch of times and refreshing, it finally presented me with a few resources. This is the way to use your 'local' maven repo w/ the OBR. The only resources I found were those that I had locally built. Not things like springframework, etc that my maven build resolves via our corp nexus. This worked in the sling console, not the Adobe CQ felix console.bmcdonald

1 Answers

0
votes

Probably you are behind proxy. Start your VM with -Dhttp.proxyHost=your.proxy.host -Dhttp.proxyPort=your.proxy.port arguments.