Apache Commons Exec

Apache Commons Exec Release Notes

Release History

Version Date Description
1.4.0 2024-01-01 Maintenance and feature Release (Java 8 or above)
1.3 2014-11-02 Maintenance and feature Release
1.2 2014-01-02 Maintenance and small feature Release
1.1 2010-10-08 Maintenance Release
1.0.1 2009-09-28 Maintenance Release
1.0 2009-03-15 First Public Release

Release 1.4.0 – 2024-01-01

Type Changes By
Add Add ShutdownHookProcessDestroyer.isEmpty(). Thanks to Gary Gregory. ggregory
Add Add DefaultExecuteResultHandler.waitFor(Duration). Thanks to Gary Gregory. ggregory
Add Add Watchdog.Watchdog(Duration). Thanks to Gary Gregory. ggregory
Add Add ExecuteWatchdog.ExecuteWatchdog(Duration). Thanks to Gary Gregory. ggregory
Add Add PumpStreamHandler.setStopTimeout(Duration) and deprecate PumpStreamHandler.setStopTimeout(long). Thanks to Gary Gregory. ggregory
Add Add DefaultExecutor.Builder. Thanks to Gary Gregory. ggregory
Add Add DaemonExecutor.Builder. Thanks to Gary Gregory. ggregory
Add Add ExecuteWatchdog.Builder. Thanks to Gary Gregory. ggregory
Add Add Watchdog.Builder. Thanks to Gary Gregory. ggregory
Fix Fix code snippet in tutorial page. Fixes EXEC-105. Thanks to Dimitrios Efthymiou.
Fix Sync org.apache.commons.exec.OS with the newest Ant source file. Fixes EXEC-100. sgoeschl
Fix DefaultExecutor swallows IOException cause instead of propagating it (work-round for Java 1.5). Fixes EXEC-64. Thanks to Michael Vorburger. sebb
Fix Java-style Array declaration and remove empty finally block #26. Thanks to nullptr. ggregory
Fix Use JUnit 5 assertThrows() #72. Thanks to John Patrick. ggregory
Fix [StepSecurity] ci: Harden GitHub Actions #107. Thanks to step-security-bot, Gary Gregory. ggregory
Fix Port from JUnit 4 to 5. Thanks to Gary Gregory. ggregory
Fix [Javadoc] CommandLine.toCleanExecutable(final String dirtyExecutable) IllegalArgumentException #61. Thanks to ArdenL-Liu, Gary Gregory. ggregory
Fix ExecuteException propagates its cause to its IOException superclass. Thanks to Gary Gregory. ggregory
Fix Propagate exception in DebugUtils.handleException(String, Exception). Thanks to Gary Gregory. ggregory
Fix Deprecate StringUtils.toString(String[], String) in favor of String.join(CharSequence, CharSequence...). Thanks to Gary Gregory. ggregory
Fix No need to use System.class.getMethod("getenv",...) any more. Fixes EXEC-78. ggregory
Fix Delegate thread creation to java.util.concurrent.ThreadFactory. Fixes EXEC-70. ggregory
Fix Avoid NullPointerException in MapUtils.prefix(Map, String). Thanks to Gary Gregory. ggregory
Remove Deprecate DefaultExecuteResultHandler.waitFor(long). Thanks to Gary Gregory. ggregory
Remove Deprecate ExecuteWatchdog.ExecuteWatchdog(long). Thanks to Gary Gregory. ggregory
Remove Deprecate Watchdog.Watchdog(long). Thanks to Gary Gregory. ggregory
Remove Drop obsolete and unmaintained Ant build. Thanks to Gary Gregory. ggregory
Remove Drop CLIRR plugin, replaced by JApiCmp. Thanks to Gary Gregory. ggregory
Update Bump github actions #52. Thanks to Gary Gregory, Dependabot. ggregory
Update Update from Java 5 to 6. Fixes EXEC-111. Thanks to Gary Gregory. ggregory
Update Update from Java 7 to 8. Thanks to Gary Gregory. ggregory
Update Bump actions/cache from 2 to 3.0.11 #48, #51, #55, #69. Thanks to Gary Gregory. ggregory
Update Bump actions/checkout from 2.3.2 to 3.1.0 #24, #46, #68. Thanks to Dependabot, Gary Gregory. ggregory
Update Bump actions/setup-java from 1.4.0 to 3.8.0 #21, #50, #70, #78. Thanks to Dependabot, Gary Gregory. ggregory
Update Bump junit from 4.13 to 5.9.1 Vintage #23, #33. Thanks to Dependabot. ggregory
Update Bump maven-pmd-plugin from 2.7.1 to 3.19.0 #45, #62. Thanks to Dependabot. ggregory
Update Bump maven-checkstyle-plugin from 2.13 to 3.2.0 #29, #60. Thanks to Dependabot. ggregory
Update Bump commons-parent from 52 to 65, #49, #65, #79, #88, #105, #137. Thanks to Dependabot, Gary Gregory. ggregory
Update Bump japicmp-maven-plugin from 0.15.6 to 0.16.0. Thanks to Gary Gregory. ggregory

Release 1.3 – 2014-11-02

Type Changes By
Add DefaultExecutor async execute prevents shutdown hooks running. Fixes EXEC-69. Thanks to Richard Atkins, Michael Vorburger. ggregory
Fix Remove remaining raw types, unchecked conversions. Fixes EXEC-81. Thanks to Stephen Compall. ggregory
Fix NullPointerException in EnvironmentUtils.toString(map). Fixes EXEC-80. ggregory
Update No need to use System.class.getMethod("getenv",...) any more. Fixes EXEC-78. sebb
Update Update JUnit dependency to 4.11. Fixes EXEC-77. britter
Update Update to Java 5. Fixes EXEC-76. britter

Release 1.2 – 2014-01-02

Type Changes By
Fix Watchdog kills process immediately if timeout is too large. Fixes EXEC-68. Thanks to Joel McCance. ggregory
Fix Applied the patch from Nickolay Martinov but the timeout disguises the fact that the process might be still running. Therefore added a sanity check in order to throw an exception if the timeout for join() was exceeded. Fixes EXEC-57. Thanks to Nickolay Martinov. sgoeschl
Fix Fixed deadlock by calling the timeout observers outside of the synchronized block thereby removing a prerequisite of a deadlock. Also added a test case to demonstrate that this problem is fixed (which of course can not guarantee the absence of a dead lock). Fixes EXEC-60. Thanks to Peter Kofler. sgoeschl
Add Set names for started threads. Fixes EXEC-55. Thanks to Dominik Stadler. sgoeschl
Fix Tests fail on HP-UX, because it uses a different syntax for the ping command. Fixes EXEC-52. Thanks to Nickolay Martinov. sebb
Fix "Write dead end" IOException when using Piped streams w/PumpStreamHandler. When encountering a PipedOutputStream we will automatically close it to avoid the exception. Fixes EXEC-49. Thanks to Kevin Telford. sgoeschl
Fix Race condition prevent watchdog working using ExecuteStreamHandler. Patch submittd by Kristian Rosenvold. Fixes EXEC-34. Thanks to Marco Ferrante. simonetripodi

Release 1.1 – 2010-10-08

Type Changes By
Fix OpenVMS now uses symbols instead of logicals for environment variables. sebb
Add Adding 'Argument' class and quote the arguments after expansion. sgoeschl
Add Reverting changes of [EXEC-41] because the patch does not fix the problem. Also added test case for the broken patch. sgoeschl
Add Added TutorialTest as a playground for new user and removed similar code from DefaultExecutorTest. sgoeschl
Fix String substitution handles now java.io.File instances in order to create a cross-platform file name. sgoeschl
Fix The 'forever.bat' accidentally overwrite the 'forever.txt' instead of appending. sgoeschl
Update DefaultExecutor() now sets the working directory with the current working directory. sgoeschl
Update Added 'DefaultExecutorTest#testStdInHandling' to show how commons-exec can feed the 'stdin' of a child process. sgoeschl
Update Improved the documentation. Fixes EXEC-42. Thanks to Konrad Windzus. sgoeschl
Update Added a PumpStreamHandler.setAlwaysWaitForStreamThreads() which allows to skip joining with the pumper threads. Having said that - using that flag is for the desperate because it could leave up to three worker threads behind but there might be situations where this is the only escape. Fixes EXEC-41. Thanks to Ernest Mishkin. sgoeschl
Fix Process.waitFor should clear interrupt status when throwing InterruptedException. Fixes EXEC-46. Thanks to Zimmermann Nir. sgoeschl
Update Added 'DefaultExecuteResultHandler' sgoeschl
Update Added a new section to the tutorial to show working with asynchronous processes. Thanks to Pablo for providing this documentation update. Fixes EXEC-42. Thanks to Pablo Hoertner. sgoeschl
Fix Because the ExecuteWatchdog is the only way to destroy asynchronous processes, it should be possible to set it to an infinite timeout, for processes which should not timeout, but manually destroyed under some circumstances. Fixes EXEC-44. sgoeschl

Release 1.0.1 – 2009-09-28

Type Changes By
Fix On a Mac, the unit tests never finish. Culprit is InputStreamPumper which sets its stop member in the run method; however, run might really be executed after the stopProcessing method is called if the process thread completes before the InputStreamPumper starts. Fixes EXEC-33. henrib
Fix Fixes NullPointerException in DefaultExecutor.setExitValues(). Fixes EXEC-40. Thanks to Peter Henderson. sgoeschl
Fix Copies all data from an System.input stream to an output stream of the executed process. Fixes EXEC-33. Thanks to Milos Kleint. sgoeschl

Release 1.0 – 2009-03-15

Type Changes By
Fix Removed useless synchronized statement in OpenVmsProcessingEnvironment.createProcEnvironment. Fixes EXEC-37. Thanks to Sebastien Bazley. sgoeschl
Fix Using System.in for child process will actually hang your application - see JIRA for more details. Since there is no easy fix an IllegalRuntimeException is thrown when System.in is passed. Fixes EXEC-33. sgoeschl
Fix Fixing a few findbugs issues. Fixes EXEC-35. Thanks to Luc Maisonobe. sgoeschl
Fix Handle null streams consistently. Fixes EXEC-32. Thanks to Marco Ferrante. sgoeschl
Fix After a long discussion we decided to stick to following groupId "org.apache.commons" instead of "commons-exec". sgoeschl
Fix The Ant build now works even when junit is not on the classpath Thanks to Kevin Jackson. sgoeschl
Fix Fixed broken "groupId" from "org.apache.commons" to "commons-exec" sgoeschl
Fix Renamed EnvironmentUtil to EnvironmentUtils to align with other classes in this project and commons in general. Please note that this change could break existing clients (but would be rather unlikely). Fixes EXEC-27. Thanks to Benjamin Bentmann. sgoeschl
Fix Make environment variables respect casing rules of platforms. Under Windows "PATH", "Path" and "path" would access the same environment variable whereas the real name is "Path". Fixes EXEC-30. Thanks to Benjamin Bentmann. sgoeschl
Fix Invoking DefaultExecutor.execute(CommandLine command, Map environment) using a 'null' Map results in inheriting all environment variables of the current process while passing an empty map implies starting the new process with no environment variables. In short 'null' is not the same as an empty map. Fixes EXEC-31. Thanks to Benjamin Bentmann. sgoeschl
Add Added one additional test : DefaultExecutorTest.testExecuteWithFancyArg. Fixes EXEC-26. Thanks to Benjamin Bentmann. sgoeschl
Fix Using variable substitution within CommandLine broke the regression tests under Windows. Found also another bug when calling CommandLine.getExecutable() the result was not substituted at all. As a general rule we do variable substitution and file separator fixing on the command line executable and variable substitution but NO file separator fixing for the command line arguments. Fixes EXEC-25. sgoeschl
Add Added convinience method to add two parameters to the CommandLine using one method invocation. sgoeschl
Fix Implemented better regression test for OpenVMS affecting also the Executor and CommandLauncher interface. sgoeschl
Add Added test scripts for OpenVMS - he seems to be the last human having access to an OpenVMS box ... :-) sebb
Add With the help of the Apache Commons community I added the first results of cross-OS testing. Thanks to Simone Gianni,Bindul Bhowmik,Niall Pemberton,Sebastian Bazley. sgoeschl
Add The regression tests now also works on Windows - so it should work now on Linux, Windows and Mac OS X sgoeschl
Add Added DebugUtils to improve cross-platform testing. sgoeschl
Remove Removed commons-logging integration sgoeschl
Add Made DefaultExecutor.launch() protected to enable mocking. Fixes SANDBOX-62. Thanks to Jeremy Lacoste. sgoeschl
Add Made ProcessDestroyer optional and pluggable when using Executor. Fixes SANDBOX-107. Thanks to Niklas Gustavsson. sgoeschl
Add CommandLine can now expand the given command line by a user-suppied map. This allows to execute something like "${JAVA_HOME}/bin/java -jar ${myapp}" sgoeschl
Add Added methods to provide pre-quoted arguments. Fixes SANDBOX-192. Thanks to Reinhold Fuereder. sgoeschl
Add Exposing a ExecuteWatchdog.destroy() to kill an asynchrounous process manually. This formalizes a workaround described in the JIRA. Fixes SANDBOX-193. Thanks to Reinhold Fuereder. sgoeschl
Add Extending exit value handling to support applications returning an error code. Fixes SANDBOX-203. sgoeschl
Fix Cleaned up the source code to get rid of javadoc errors and unused imports. Fixes SANDBOX-204. sgoeschl
Add Added a few regression tests for the watchdog since they were missing. Fixes SANDBOX-204. sgoeschl