code: private void importFilesToJCR(SessionProvider sp, File folder) throws Exception
     {
  
        for (File file : folder.listFiles(new DefaultFileFilter()))
        {
  
           if (file.isDirectory())
           {
              importFilesToJCR(sp, file);
           }
  
           String ext = FilenameUtils.getExtension(file.getAbsolutePath());
           if (ext.equals("pom"))
           {
              String basename = FilenameUtils.removeExtension(file.getAbsolutePath());
              File jarfile = new File(basename.concat(".jar"));
  
              if (jarfile.exists())
              {
                 // get descripting from pom file
                 try
                 {
                    ArtifactDescriptor artifact = ArtifactDescriptor.createFromPomfile(file);
                    InputStream jarIStream = new FileInputStream(jarfile);
                    InputStream pomIStream = new FileInputStream(file);
  
                    addArtifact(sp, artifact, jarIStream, pomIStream);
                 }
                 catch (org.xml.sax.SAXParseException e)
                 {
                    // throw new ArtifactDescriptorException(FilenameUtils.getName(file.getAbsolutePath()));
                    this.listErrorPom.add(FilenameUtils.getName(file.getAbsolutePath()));
                    continue;
                 }
              }
           }
        }
     }
docs: /*
  This method provides adding to JCR artifacts. this means that jar-files and appropriate pom
  files would be added. Main logic: scan all files & if it is a pair jar/pom -add it.