code: public void addArtifact(SessionProvider sp, ArtifactDescriptor artifact, InputStream jarIStream,
              InputStream pomIStream) throws RepositoryException
     {
  
        Session session = currentSession(sp);
        Node rootNode = (Node) session.getItem(rootNodePath);
  
        Node groupId_tail = createGroupIdLayout(rootNode, artifact);
  
        Node artifactId_node = createArtifactIdLayout(groupId_tail, artifact);
  
        Node version_node = createVersionLayout(artifactId_node, artifact);
  
        if (version_node != null)
        { // returns if the same node sibling appears
           importResource(version_node, jarIStream, "jar", artifact);
           importResource(version_node, pomIStream, "pom", artifact);
        }
  
        session.save();
  
     }
docs: /*
  (non-Javadoc)
  @see org.exoplatform.services.jcr.ext.maven.ArtifactManagingService#addArtifact
  (org.exoplatform.services.jcr.ext.common.SessionProvider,
  org.exoplatform.services.jcr.ext.maven.ArtifactDescriptor, java.io.InputStream)