code: public void removeArtifact(SessionProvider sp, Descriptor artifact) throws RepositoryException
     {
        Session session = currentSession(sp);
        Node root = (Node) session.getItem(rootNodePath);
  
        String pathToRemove = "";
  
        if (rootNodePath.length() > 1)
        {
           if (rootNodePath.endsWith("/"))
              pathToRemove = rootNodePath + artifact.getAsPath();
           else
              pathToRemove = rootNodePath + "/" + artifact.getAsPath();
        }
        else
        {
           pathToRemove = "/" + artifact.getAsPath();
        }
  
        if (LOG.isDebugEnabled())
        {
           LOG.debug("Remove node: " + pathToRemove);
        }
  
        Node rmNode = (Node) session.getItem(pathToRemove);
  
        // while (rmNode != root) {
        // Node parent = rmNode.getParent();
        rmNode.remove();
        // if (!parent.hasNodes())
        // rmNode = parent;
        // else
        // break;
        // }
        session.save();
     }
docs: /*
  According JCR structure, version Node holds all actual data: jar, pom and ckecksums Removing
  that node is removing all content and artifact indeed!
  @see org.exoplatform.services.jcr.ext.maven.ArtifactManagingService#removeArtifact
  (org.exoplatform.services.jcr.ext.common.SessionProvider,
  org.exoplatform.services.jcr.ext.maven.ArtifactDescriptor)