Skip to content

Commit

Permalink
Remove warning about non-existing directories for module-path
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Feb 5, 2024
1 parent aaba0b7 commit c8e91a3
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions project/JPMSPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ object JPMSPlugin extends AutoPlugin {
)
}.toSeq

ensureDirectoriesExist(modulePath, log)

val addExportsOpts: Seq[String] = addExports.flatMap {
case (modPkgName, targetModules) =>
if (!modPkgName.contains("/")) {
Expand Down Expand Up @@ -154,20 +152,4 @@ object JPMSPlugin extends AutoPlugin {

modulePathOpts ++ addModsOpts ++ patchOpts ++ addExportsOpts ++ addReadsOpts
}

/** Java does not mandate that the directories specified in the module path or
* in --patch-module exist, but it is usefull to report at least warnings.
* @param dirs
* @param log
*/
private def ensureDirectoriesExist(
dirs: Seq[File],
log: Logger
): Unit = {
dirs.foreach { dir =>
if (!dir.exists()) {
log.warn(s"JPMSPlugin: Directory $dir does not exist.")
}
}
}
}

0 comments on commit c8e91a3

Please sign in to comment.