Skip to main content

In eclipse: xjc task turns off ant's output.

2 replies [Last post]
jjfraney
Offline
Joined: 2005-08-24

When I run ant in eclipse (3.1.1), a target with the xjc task runs fine but turns off output to eclipse's Console view. I get output leading up to xjc task, then nothing else until the ant build ends. Even ant error messages do not appear.

I can tell it runs fine because artifacts are generated in build directory. Running from command line, output is not turned off when running xjc task.

I'd not seen this with an ant task before. Is there something different about xjc in this regard?

John

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
kohsuke_agent
Offline
Joined: 2003-06-25

Hmm. It's really just an ordinary task, so I don't know why it's behaving that way.

XJC task prints everything through the Task.log(...) method, and as far as I can tell, it's written as a good citizen in the Ant world (and I thought I had a lot of experience writing Ant tasks.)

I wonder if you can file a bug against Eclipse, citing that we are eager to work with them to fix this issue?

jjfraney
Offline
Joined: 2005-08-24

OK. I can, if I can isolate the issue further. Hope you don't mind if I put down some observation here, as a matter of record.

I discovered that if the xjc task's 'target' pre-exists the launch of ant, output is normal. On the other hand, ant behaves as I described above if xjc's target does not preexist and so must be created during the run of ant.

An abbreviated build.xml to exemplify. ${gensrc} is xjc's target directory:





John