3 ms·
You could extract a macro to create a ZipEntry, bind it to standard out, and execute some actions that write to the ZipEntry. Then the code starting with .putN
by jimbokun 16y ago
You could extract a macro to create a ZipEntry, bind it to standard out, and execute some actions that write to the ZipEntry. Then the code starting with .putNextEntry and ending with .closeEntry becomes something like
(with-zip-entry out "META-INF/plexus/components.xml"
(xml-emit ...)
This macro should be useful other places where you are writing to zip files. And it should bring the println closer to the start of its containing scope, making it easier to tell at a glance the scope to which it belongs.