Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
bundlerepository-2.0.8
-
None
Description
I've created some index.xml (R5) files using a tool that was based on old bindex tool. since those files will be hosted in a server the url attribute of bundles and other resources are using relative path (what I think is the right approach since we don't know the real address of the server at this time:
<repo:capability namespace="osgi.content">
<repo:attribute name="osgi.content" value="2ab00a18d414d1c43a7f8ba286f16f323c6b940ca775cdfd974dd6c127a35b25"/>
<repo:attribute name="url" value="plugins/ch.qos.logback.core_1.2.1.jar"/>
<repo:attribute name="size" type="Long" value="473113"/>
<repo:attribute name="mime" value="application/vnd.osgi.bundle"/>
</repo:capability>
But when I try to deploy any bundle using RepositoryAdmin or obr:deploy command, I'm getting an exception: java.net.MalformedURLException: no protocol: plugins/ch.qos.logback.core_1.2.1.jar
The proposed solution is to pass the URL of the repository to the parser and in case of a non-absolute uri were found it will be resolved against the repository uri.