ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Fankhauser <ni...@lux.wox.org>
Subject problem with 'java' task, cut stack traces, forked jvm and stdout
Date Fri, 20 Dec 2002 13:52:23 GMT
hi

I've read the manual and searched the web and this mailinglist's archive
- but haven't found a solution for my little problem yet, so I'd be glad
if someone could help me...

I am using the 'java' task to run a program and if this program throws
an exception, ANT cuts the stack trace and displays only the first line.
However if I set the attribute fork to 'yes' in the 'java' task, it does
give me the full stack trace, but (strangely) interweaves the stack
trace with the stdout the program does.

An example with fork=no:

---
     [java] TYPE_PAREN (line 14, pos 29, absPos 317 - 318): '{'
     [java] TYPE_PAREN (line 14, pos 30, absPos 318 - 319): '}'
     [java] TYPE_PAREN (line 15, pos 0, absPos 320 - 321): '}'
     [java] NODE_UNIT (line 0, pos 0, absPos 0 - 0): ''
     [java]   NODE_IDENTIFIER (line 0, pos 0, absPos 0 - 0): ''
     [java]     TYPE_IDENTIFIER (line 1, pos 7, absPos 7 - 18):
'TinjaApplet'
     [java]   NODE_IDENTIFIER (line 0, pos 0, absPos 0 - 0): ''
     [java]     TYPE_IDENTIFIER (line 2, pos 7, absPos 27 - 38):
'TinjaCanvas'
     [java]   NODE_CLASS (line 0, pos 0, absPos 0 - 0): ''
     [java]     NODE_IDENTIFIER (line 0, pos 0, absPos 0 - 0): ''
     [java]       TYPE_IDENTIFIER (line 4, pos 13, absPos 54 - 62):
'myApplet'
     [java]     NODE_IDENTIFIER (line 0, pos 0, absPos 0 - 0): ''
     [java]       TYPE_IDENTIFIER (line 4, pos 30, absPos 71 - 82):
'TinjaApplet'
     [java] iiuf.lang.tinja.TJException: semantic : not yet implemented
---

The same with fork=yes:

---
     [java] TYPE_KEYWORD (line 1, pos 0, absPos 0 - 6): 'import'
     [java] TYPE_IDENTIFIER (line 1, pos 7, absPos 7 - 18):
'TinjaApplet'
     [java] TYPE_PUNCT (line 1, pos 18, absPos 18 - 19): ';'
     [java] TYPE_KEYWORD (line 2, pos 0, absPos 20 - 26): 'import'
     [java] TYPE_IDENTIFIER (line 2, pos 7, absPos 27 - 38):
'TinjaCanvas'
     [java] Exception in thread "main" iiuf.lang.tinja.TJException:
semantic : not yet implemented
     [java] TYPE_PUNCT (line 2, pos 18, absPos 38 - 39): ';'
     [java] TYPE_KEYWORD (line 4, pos 0, absPos 41 - 47): 'public'
     [java] TYPE_KEYWORD (line 4, pos 7, absPos 48 - 53): 'class'
     [java] TYPE_IDENTIFIER (line 4, pos 13, absPos 54 - 62): 'myApplet'
     [java] TYPE_KEYWORD (line 4, pos 22, absPos 63 - 70): 'extends'
     [java] 	at axon.TinjaCompiler.semantic(TinjaCompiler.java:68)
     [java] 	at axon.TinjaCompiler.main(TinjaCompiler.java:35)
     [java] TYPE_IDENTIFIER (line 4, pos 30, absPos 71 - 82):
'TinjaApplet'
     [java] TYPE_PAREN (line 4, pos 41, absPos 82 - 83): '{'
     [java] TYPE_KEYWORD (line 5, pos 2, absPos 86 - 93): 'private'
     [java] TYPE_KEYWORD (line 5, pos 10, absPos 94 - 97): 'int'
     [java] TYPE_IDENTIFIER (line 5, pos 19, absPos 103 - 104): 'a'
---

I know I could (and maybe will) use log4j or similar to log into a file
(instead of simply printing out to stdout) while keeping fork=yes - but
I'd like to have a simpler solution...

thank you.

regards
nicola fankhauser


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message