X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.repo%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Frepo%2FJarFileIndexer.java;h=b07cade3367474c79e311e723687cc122d5a8821;hb=d7c9180e5ad639b141ecc51f36e7fd65f19403f9;hp=6ade4464bb1a5c8188752cd80de2bc020460c774;hpb=3eb8ad695c266f1494a3b64a0447bcfe580e8915;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/JarFileIndexer.java b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/JarFileIndexer.java index 6ade4464b..b07cade33 100644 --- a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/JarFileIndexer.java +++ b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/JarFileIndexer.java @@ -157,8 +157,8 @@ public class JarFileIndexer implements NodeIndexer, SlcNames { try { jarIn = new JarInputStream(fileBinary.getStream()); String bundleLocalization = null; - - String blKey = Constants.BUNDLE_LOCALIZATION; //"Bundle-Localization"; + + String blKey = Constants.BUNDLE_LOCALIZATION; // "Bundle-Localization"; Name blkName = new Name(blKey); browse: for (Object obj : attrs.keySet()) { @@ -231,6 +231,15 @@ public class JarFileIndexer implements NodeIndexer, SlcNames { protected void addOsgiMetadata(Node fileNode, Attributes attrs) throws RepositoryException { + + // TODO remove this ? + // Compulsory for the time being, because bundle artifact extends + // artifact + if (!fileNode.isNodeType(SlcTypes.SLC_ARTIFACT)) { + ArtifactIndexer indexer = new ArtifactIndexer(); + indexer.index(fileNode); + } + fileNode.addMixin(SlcTypes.SLC_BUNDLE_ARTIFACT); // symbolic name