File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -218,6 +218,21 @@ object os extends Module {
218218 PathRef(Task.dest / "unzipped" / "org/apache/tools/zip")
219219 }
220220
221+ /**
222+ * Shades Apache Ant
223+ * [[`org.apache.tools.zip` https://ant.apache.org/manual/api/org/apache/tools/zip/package-summary.html package]] to
224+ * provide Unix file permission and symbolic link support for `os.zip` and `os.unzip`
225+ *
226+ * A third party dependency is needed since JDK's own
227+ * [[`jdk.zipfs` https://docs.oracle.com/en/java/javase/14/docs/api/jdk.zipfs/module-summary.html]] does not support
228+ * symbolic links and only supports file permissions since JDK 14.
229+ *
230+ * Apache Ant `org.apache.tools.zip` was chosen over Apache Commons Compress due to the former not having any
231+ * third party dependency, only depending on Java core libraries while the later also depends on Apache Commons IO.
232+ *
233+ * To avoid classpath conflicts, the dependency is shaded and compiled from source. Only the `org.apache.tools.zip`
234+ * package, not the entire Ant codebase, is needed. This only adds < 100kb to Os-Lib jar size.
235+ */
221236 def apacheAntZipSource: T[PathRef] = Task {
222237 _root_.os.walk.stream(zipSrc)
223238 .filter(_.ext == "java")
You can’t perform that action at this time.
0 commit comments