X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.repo%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Frepo%2FArtifactIndexer.java;h=841f22d38b8e9713340494cc989bd1c25c791fb8;hb=4663b42433ba4a16c81d90927aecff2a923cd7a4;hp=4b767796151d044a02e0b91c2771777f0aedf6d1;hpb=830e76f41e6fb0614e94f996e4be5a3da08b2a28;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/ArtifactIndexer.java b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/ArtifactIndexer.java index 4b7677961..841f22d38 100644 --- a/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/ArtifactIndexer.java +++ b/runtime/org.argeo.slc.repo/src/main/java/org/argeo/slc/repo/ArtifactIndexer.java @@ -5,6 +5,7 @@ import javax.jcr.nodetype.NodeType; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.argeo.jcr.JcrUtils; import org.argeo.slc.SlcException; import org.argeo.slc.aether.AetherUtils; import org.argeo.slc.jcr.SlcNames; @@ -55,6 +56,7 @@ public class ArtifactIndexer implements NodeIndexer { // can be null but ok for JCR API fileNode.setProperty(SlcNames.SLC_ARTIFACT_CLASSIFIER, artifact.getClassifier()); + JcrUtils.updateLastModified(fileNode); // set higher levels Node artifactVersionBase = fileNode.getParent(); @@ -68,6 +70,7 @@ public class ArtifactIndexer implements NodeIndexer { artifact.getArtifactId()); artifactVersionBase.setProperty(SlcNames.SLC_GROUP_ID, artifact.getGroupId()); + JcrUtils.updateLastModified(artifactVersionBase); } Node artifactBase = artifactVersionBase.getParent(); if (!artifactBase.isNodeType(SlcTypes.SLC_ARTIFACT_BASE)) { @@ -76,12 +79,20 @@ public class ArtifactIndexer implements NodeIndexer { artifact.getArtifactId()); artifactBase.setProperty(SlcNames.SLC_GROUP_ID, artifact.getGroupId()); + JcrUtils.updateLastModified(artifactBase); } + + // TODO do we really need group base? Node groupBase = artifactBase.getParent(); if (!groupBase.isNodeType(SlcTypes.SLC_GROUP_BASE)) { + // if (groupBase.isNodeType(SlcTypes.SLC_ARTIFACT_BASE)) { + // log.warn("Group base " + groupBase.getPath() + // + " is also artifact base"); + // } groupBase.addMixin(SlcTypes.SLC_GROUP_BASE); - groupBase.setProperty(SlcNames.SLC_GROUP_ID, + groupBase.setProperty(SlcNames.SLC_GROUP_BASE_ID, artifact.getGroupId()); + JcrUtils.updateLastModified(groupBase); } if (log.isTraceEnabled())