This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 158492 - <java> broken in Ant 1.8.0
Summary: <java> broken in Ant 1.8.0
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: t_h
URL:
Keywords:
Depends on: 167966
Blocks:
  Show dependency tree
 
Reported: 2009-02-12 22:25 UTC by Jesse Glick
Modified: 2009-08-26 06:42 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2009-02-12 22:25:48 UTC
It seems that when you switch the IDE's internal Ant to a 1.8.0 dev build and try to run any user program, you see no
output, whereas the same works fine from the cmdline.
Comment 1 t_h 2009-04-06 15:19:56 UTC
core-main #1b19692d24b8
Comment 2 Jesse Glick 2009-04-06 17:41:53 UTC
The code after the patch reads

OutputStream os = getOutputStream();
Integer logLevel = null;
os = AntBridge.delegateOutputStream(false);
logLevel = Project.MSG_INFO;
outTask = new Thread(Thread.currentThread().getThreadGroup(), new Copier(inputStream, os, logLevel, outEncoding), ...);

(similarly for err). Surely this should be simplified:

outTask = new Thread(Thread.currentThread().getThreadGroup(),
  new Copier(inputStream, AntBridge.delegateOutputStream(false), Project.MSG_INFO, outEncoding), ...);


I am missing any explanation of the fix, either in IZ or in the changeset. What is the root difference between 1.7.1 and
1.8.0 in this regard? What effect does this patch have on Ant 1.7.1 clients? What happens to scripts calling e.g.

<java fork="true" outputfile="program-out" .../>

?
Comment 3 Quality Engineering 2009-04-07 07:23:22 UTC
Integrated into 'main-golden', will be available in build *200904070200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1b19692d24b8
User: Tomas Holy <t_h@netbeans.org>
Log: #158492: <java> broken in Ant 1.8.0
Comment 4 t_h 2009-04-07 09:53:04 UTC
The difference between 1.7.1 and 1.8.0 is that in 1.8.0 getOutputStream()/getErrorStream() returns
org.apache.tools.ant.util.OutputStreamFunneler$Funnel while 1.7.1 returns org.apache.tools.ant.taskdefs.LogOutputStream.

I put safer change to core-main #6119721e07fb
Comment 5 t_h 2009-07-28 15:47:30 UTC
Reverted due to issue #167966
Comment 6 Jesse Glick 2009-08-21 17:37:25 UTC
A 1.8.0 release may be approaching so this needs to be fixed. Please read my last comment in issue #167966.
Comment 7 t_h 2009-08-25 15:54:41 UTC
Try to find better fix for this issue and issue #167966 in core-main #49c08ceeeb2e. Seems similar to issue #168153 as
Jesse pointed out.
Comment 8 Quality Engineering 2009-08-26 06:42:07 UTC
Integrated into 'main-golden', will be available in build *200908260201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/49c08ceeeb2e
User: Tomas Holy <t_h@netbeans.org>
Log: #158492: <java> broken in Ant 1.8.0