private def processSingleSource()

in packaging/src/main/scala/org/jetbrains/sbtidea/packaging/artifact/JarPackager.scala [105:124]


  private def processSingleSource(src: Path, outputFS: FileSystem): Unit = {
    if (!src.toString.contains("jar!") && !Files.exists(src))
      return

    val fs = try createInputFS(src) catch {
      case NonFatal(ex) =>
        //note: the exception doesn't contain hint about the input
        throw new RuntimeException(s"Can't create input file system for path: $src (${ex.getClass.getSimpleName} -${ex.getMessage})", ex)
    }
    usingFileSystem(fs) { fs =>
      val inputRoot = createInput(src, fs)
      walkEntry(inputRoot, outputFS) { (from, to) =>
        if (to.getParent != null)
          Files.createDirectories(to.getParent)
        shader.applyShading(from, to) {
          Files.copy(from, to, StandardCopyOption.REPLACE_EXISTING)
        }
      }
    }
  }