X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.repo%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Frepo%2FDistributionBundleIndexer.java;fp=runtime%2Forg.argeo.slc.repo%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Frepo%2FDistributionBundleIndexer.java;h=7dfefc2a1ed9ca4f4fde3c2669004473684f512d;hb=2ecb1e7ce15a25ba8026b5ded625f36c1be467bd;hp=7441490bcbad0f3c145543a51b2815dad73fc4ca;hpb=702f1e0c7d73edeb739dd62cd4248f489e1420b7;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/DistributionBundleIndexer.java b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/DistributionBundleIndexer.java index 7441490bc..7dfefc2a1 100644 --- a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/DistributionBundleIndexer.java +++ b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/DistributionBundleIndexer.java @@ -136,14 +136,13 @@ public class DistributionBundleIndexer implements NodeIndexer { Node moduleCoord = modules.addNode( artifact.getArtifactId(), SlcTypes.SLC_MODULE_COORDINATES); - moduleCoord.setProperty(SlcNames.SLC_MODULE_NAME, + moduleCoord.setProperty(SlcNames.SLC_NAME, artifact.getArtifactId()); - moduleCoord.setProperty(SlcNames.SLC_MODULE_VERSION, + moduleCoord.setProperty(SlcNames.SLC_VERSION, artifact.getVersion()); String groupId = artifact.getGroupId(); if (groupId != null && !"".equals(groupId.trim())) - moduleCoord.setProperty( - SlcNames.SLC_MODULE_CATEGORY, + moduleCoord.setProperty(SlcNames.SLC_CATEGORY, artifact.getGroupId()); } } @@ -188,8 +187,10 @@ public class DistributionBundleIndexer implements NodeIndexer { while ((line = reader.readLine()) != null) { StringTokenizer st = new StringTokenizer(line, separator); - String moduleName = st.nextToken(); - String moduleVersion = st.nextToken(); + // String moduleName = + st.nextToken(); + // String moduleVersion = + st.nextToken(); String relativeUrl = st.nextToken(); // @@ -208,17 +209,17 @@ public class DistributionBundleIndexer implements NodeIndexer { return artifacts; } - /** Relative path to the directories where the files will be stored */ - private String getCategoryFromRelativeUrl(String relativeUrl, - String moduleName) { - int index = relativeUrl.indexOf("moduleName"); - if (index < 1) - throw new SlcException("Unvalid relative URL: " + relativeUrl - + " for module " + moduleName); - // Remove trailing / - String result = relativeUrl.substring(0, index - 1); - return result.replace('/', '.'); - } + // /** Relative path to the directories where the files will be stored */ + // private String getCategoryFromRelativeUrl(String relativeUrl, + // String moduleName) { + // int index = relativeUrl.indexOf("moduleName"); + // if (index < 1) + // throw new SlcException("Unvalid relative URL: " + relativeUrl + // + " for module " + moduleName); + // // Remove trailing / + // String result = relativeUrl.substring(0, index - 1); + // return result.replace('/', '.'); + // } /** * List full URLs of the bundles, based on base URL, usable directly for