RFR: 8281104: jar --create should create missing parent directories

Lance Andersen lancea at openjdk.java.net
Fri Feb 4 21:40:06 UTC 2022

On Wed, 2 Feb 2022 20:21:54 GMT, Christian Stein <cstein at openjdk.org> wrote:

> Calling `jar --create --file a/b/foo.jar INPUT-FILES` should create missing parent directories (here `a/b`) on the default file system before storing the JAR file (here `foo.jar`) in the destination directory.

> > I think this would be the appropriate place for documenting the behavior.
> Like this?
> ```
> -c, --create               Create the archive. When the path specified by -f, --file
>                            contains a path, missing parent directories will also be created
> ...
> -f, --file=FILE            The archive file name. When omitted, either stdin or
>                            stdout is used based on the operation. Missing parent
>                            directories of the file name path will be created
> ```
> Perhaps, only adding it to `-c, --create` suffices. Having it also on `-f, --file` may confuse users, as this option is used all operation modes.

I think just having the verbiage when creating the jar should suffice as if we were updating it, the path would need to exist already.
> > Also we will need to update the MD file which represents the jar man page via a separate PR.
> Yes. Will create PR for this.

Great, thank you.  Have a good weekend!


PR: https://git.openjdk.java.net/jdk/pull/7327

More information about the compiler-dev mailing list