Bug 30684 - Ant should be given the option of being run in its own process
Summary: Ant should be given the option of being run in its own process
Status: RESOLVED DUPLICATE of bug 24129
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-01-31 03:03 EST by Peter John Golda CLA
Modified: 2003-02-05 10:55 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter John Golda CLA 2003-01-31 03:03:28 EST
Although you give the option of running Ant in the background, it is 
presumably run in a separate thread, and not a separate process. We feel that 
Ant should be spawned in its own process for the following reason:

If you have a complex multithreaded Java application, a rather standard unit 
test is to assert that all threads spawned by the application are gone at 
shutdown.

This test will always fail with Eclipse currently, because the Eclipse thread 
is always remaining and hence the blanket test for alive threads fails.

The reason why we feel this is a bug (and not a feature), is that ideally Ant 
should behave in exactly the same manner and produce the same results whether 
it is run from the command line or launched from Eclipse. This is not about 
being able to say "fork=yes" in the Ant build file... this is merely the 
principle that Ant should behave in the same way whether run from Eclipse or 
not.
Comment 1 Darin Swanson CLA 2003-01-31 08:45:20 EST
This is a duplicate of bug 24129.

The reason Eclipse Ant integration is executed in the same VM is to allow the 
build / tasks / types to have access to the Eclipse "environment".
We realize that not all users want or need this integration.

Note that it is possible to execute Ant from Eclipse in a separate VM.  You can 
create a external tools launch configuration that starts java much like the 
ant.bat file from the commandline:

java.exe -classpath yourClasspath "-Dant.home=pathToYourAntHome 
org.apache.tools.ant.Main -buildfile yourBuildFile.xml

I will attempt to create and attach a "generic" .launch file that can be used 
in this way (later today or over the weekend).
Comment 2 Darin Swanson CLA 2003-02-05 10:55:22 EST
Example launch config added to bug 24129 (and bug 30353).

*** This bug has been marked as a duplicate of 24129 ***