Skip to content

4.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Nov 23:28
· 1 commit to master since this release
plexus-utils-4.2.0

plexus-utils 4.2.0 makes the file deletion helpers safe around symbolic links, lets CommandLineUtils forward the console's standard input to a child process, and fixes several FileUtils and command-line parsing edge cases. It requires Java 8 or later. The XML classes live in plexus-xml, which this release moves up to 3.1.1.

โœจ Highlights

  • Deleting a tree no longer deletes outside it. FileUtils.forceDeleteOnExit followed symbolic links to directories, so a link inside the tree got every file under its target deleted when the JVM exited. deleteDirectory could empty a link's target when the link itself could not be removed. Both now remove only the link (#348, thanks @kakkar87d).
  • Child processes can read the console. When CommandLineUtils.executeCommandLine gets System.in as the process input, it now polls it instead of blocking in read(), so the call returns once the process exits rather than hanging on an idle terminal (#351, fixes #260).
  • translateCommandline splits at tabs and line breaks. Outside quotes, \t, \n and \r now separate arguments like a space does. Input that held one of these characters unquoted now yields more arguments; quoted text is unchanged (#352, fixes #329).
  • Clearer FileUtils failures. forceDelete uses Files.deleteIfExists, so it also removes dangling symbolic links and skips the Windows retry delay for files that are already gone (#350, fixes #21). copyDirectoryStructure and cleanDirectoryOnExit report an unreadable directory as an IOException naming it, instead of a NullPointerException (#349).
  • plexus-xml 3.1.1 fixes a parser buffer overrun on a supplementary character in an XML comment (#354).

The same fixes, without the standard-input change, are in 3.6.3 for the 3.x line.

๐Ÿš€ New features and improvements

  • Poll System.in for stdin in CommandLineUtils.executeCommandLine (#351) @slachiewicz

๐Ÿ› Bug Fixes

  • Do not follow symlinks in forceDeleteOnExit and deleteDirectory (#348) @kakkar87d
  • Split translateCommandline at tabs and line breaks (#352) @slachiewicz
  • Use Files.deleteIfExists in FileUtils.forceDelete (#350) @slachiewicz
  • Report an unlistable directory as IOException instead of NullPointerException (#349) @slachiewicz

๐Ÿ“ Documentation updates

๐Ÿ”ง Build

๐Ÿ“ฆ Dependency updates

Full changelog