[ https://issues.apache.org/jira/browse/FELIX-4765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14364886#comment-14364886 ]
Jan Winter commented on FELIX-4765: ----------------------------------- I have only a bndtools-workspace (eclispe-GUI) related. - Is that helpful? Migration to CLI with gradle+ant will take some time? > RepositoryAdmin don´t discover my required resources. > ----------------------------------------------------- > > Key: FELIX-4765 > URL: https://issues.apache.org/jira/browse/FELIX-4765 > Project: Felix > Issue Type: Bug > Components: Bundle Repository (OBR) > Affects Versions: bundlerepository-2.0.2 > Reporter: Jan Winter > Priority: Minor > Attachments: CapabilityDuplicator.java, index.xml, index.xml.patched > > > I use 'org.apache.felix.bundlerepository-2.0.2.jar' > I register a index.xml (@see attachement index.xml) > - generated by 'org.osgi.impl.bundle.repoindex.lib-2.1.1.jar' > - with content: > bundle.1 `export` bundle.1.requieredpackage > bundle.2 > bundle.3 `requiere` bundle.2 > bundle.3 `import` bundle.1.requieredpackage > If I try to discover the requirements of bundle.3 > {code} > Resource[] discoverResources = > this.repositoryAdmin.discoverResources("(symbolicname=bundle.3)"); > for (Resource resource : discoverResources) { > System.out.printf("Resources: %s. Require:\n", > resource.getSymbolicName()); > > for (final Requirement requirement : > resource.getRequirements()) { > Resource[] dependencies = > this.repositoryAdmin.discoverResources(new Requirement[] { requirement }); > > System.out.printf("\t%s: %s\n", requirement, > Arrays.toString(dependencies)); > } > } > {code} > Than I got no results for any requirement. > I patch my index.xml file like this (@see attached index.xml.patch): > {noformat} > 50a51,54 > > <capability namespace="osgi.wiring.bundle"> > > <attribute name="bundle" value="bundle.2"/> > > <attribute name="bundle-version" type="Version" value="1.0"/> > > </capability> > 85a90,95 > > <capability namespace="osgi.wiring.package"> > > <attribute name="package" value="bundle.1.requiredpackage"/> > > <attribute name="version" type="Version" value="0.0.0"/> > > <attribute name="bundle-symbolic-name" value="bundle.1"/> > > <attribute name="bundle-version" type="Version" value="1.0"/> > > </capability> > {noformat} > Than I got results. > Anything goes wrong while bindex.xml-generation or repoadmin-discovering. -- This message was sent by Atlassian JIRA (v6.3.4#6332)