code: public void importArtifacts(SessionProvider sp, InputStream in) throws RepositoryException, FileNotFoundException
     {
        LOG.info("Extract repository to temporary folder");
        String path = System.getProperty("java.io.tmpdir") + File.separator + "maven2";
        File temporaryFolder = new File(getUniqueFilename(path));
        if (!temporaryFolder.mkdir())
        {
           throw new FileNotFoundException("Cannot create temporary folder");
        }
        ZipEntry entry;
        ZipInputStream zipIn = new ZipInputStream(new BufferedInputStream(in));
        try
        {
           while ((entry = zipIn.getNextEntry()) != null)
           {
  
              if (!(entry.isDirectory() && new File(temporaryFolder + File.separator + entry.getName()).mkdir()))
              {
                 int count;
                 byte data[] = new byte[BUFFER];
                 File file = new File(temporaryFolder + File.separator + entry.getName());
  
                 FileUtils.touch(file);
  
                 FileOutputStream fos = new FileOutputStream(file);
                 BufferedOutputStream dest = new BufferedOutputStream(fos, BUFFER);
                 while ((count = zipIn.read(data, 0, BUFFER)) != -1)
                 {
                    dest.write(data, 0, count);
                 }
                 dest.flush();
                 dest.close();
              }
  
           }
        }
        catch (IOException e)
        {
           LOG.error("Cannot get zip entry from stream", e);
        }
        finally
        {
           IOUtils.closeQuietly(zipIn);
           IOUtils.closeQuietly(in);
        }
  
        // main part - copy to JCR from temp folder
        // use uploading artifacts from local folder.
  
        importArtifacts(sp, temporaryFolder);
        try
        {
           FileUtils.deleteDirectory(temporaryFolder);
        }
        catch (IOException e)
        {
           LOG.error("Cannot remove temporary folder", e);
        }
  
     }
docs: /*
  (non-Javadoc)
  @see org.exoplatform.services.jcr.ext.maven.ArtifactManagingService#importArtifacts
  (org.exoplatform.services.jcr.ext.common.SessionProvider, java.io.InputStream)