https://bz.apache.org/bugzilla/show_bug.cgi?id=65148
Bug ID: 65148
Summary: AntLauncher terminates enclosing VM
Product: Ant
Version: 1.10.9
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P2
Component: Core
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
org.apache.tools.ant.launch.Launcher.main() is the recommended way to launch
ant from Java as per https://ant.apache.org/manual/running.html#viajava .
However,
org.apache.tools.ant.launch.Launcher.main()
calls System.exit(exitCode); (l.114)
This means that integrating this launcher will kill a VM on an error.
This issue cannot be addressed by subclassing as the constructor of Launcher is
private, not protected, and is called from main().
This means that any reuser either needs to spawn a VM, or copy the class into a
private namespace, shadow it or copy the dispatch method under a different name
to extend. None of these alternatives is appealing.
Please ensure that this reuse issue is fixed or deprecate the launcher if it
is not intended for this purpose or cannot be used this way.
--
You are receiving this mail because:
You are the assignee for the bug.