This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 35923 - Inconsistent behavior when running from the UI or headless
Summary: Inconsistent behavior when running from the UI or headless
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-01 12:02 EST by Pascal Rapicault CLA
Modified: 2009-08-30 02:22 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2003-04-01 12:02:35 EST
I have a task that creates a new instance of AntRunner() to run an ant script 
that I generate in my task.

To be precise: the eclipse.fetch task internally generates a retrieve.xml 
(which is an ant script) that is executed.

I have a build.xml file that makes use of eclipse.fetch. When I run it as an 
external tool from the UI, I get an error saying that it not autorized to have 
two scripts running simultaneously. However if I run the same script headless, 
I do not get the error and my script works fine.

Looking at the AntRunner code it seems that you do not set buildRunning in the 
method run(Object).

The "buildRunning" var seems to have been introduced as a fix to bug #29318.

I understand the reason for the fix, but it is a strong solution for a little 
inconvenience since now it prevents the antRunner to be re-entrant. 

Why is it not possible to do the test in a "UI level"?

Thanx
Comment 1 Darin Swanson CLA 2003-04-02 16:17:33 EST
The headless case should not be allowing two concurrent Ant builds either.

Due to the design of Apache Ant and its use of System resources (such as
System.out and System.err), it is not possible (read safe or deterministic) to 
run more than one Ant build in the same VM at the same time. There is no way to 
guarantee the property restoration of System.out, System.err, security 
managers, thread context class loaders ...
Comment 2 Darin Swanson CLA 2003-05-12 15:22:43 EDT
Can the eclipse.fetch task be modified to generate the retrieve.xml and then 
your build.xml <ant> retrieve.xml?
Comment 3 Darin Swanson CLA 2004-03-19 18:01:51 EST
Where does the pde build still stand on this issue?
Comment 4 Darin Swanson CLA 2004-04-13 21:19:12 EDT
No plans to address in 3.0
Comment 5 Denis Roy CLA 2009-08-30 02:22:14 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.