Grokbase Groups Ant user August 2009
Nadun Herath schrieb:
I have to run a Java program Called MiniJavaParser using different file names as arguements several
times using Java Task. When it runs it gives the message

"MiniJava program parsed successfully" or Encountered errors during parse.

I want to declare a variable as a counter and increment it's value when it gives the message "MiniJava Program parsed successfully".

What is the approach I should take.

when your java task does things "several times" why not make it a new
ant task or a macrodef / scriptdef (use a language that runs on JVM via
BSF, f.e. jruby/groovy/beanshell/javascript/jython ...) ?

That way you'll have full access to ant api and project scope, means you
may set new properties (and even overwrite existing properties f.e. a
counter) for further processing in your ant workflow.

Other approaches =

grep the return from your java class with outputproperty, find examples
via google > ant+java+outputproperty, first result gives me =

the java task has several attributes to catch stdout stderr .. see =

low level = writing to a file as already mentioned in another post
from this thread

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 6 of 6 | next ›
Discussion Overview
groupuser @
postedAug 27, '09 at 2:51a
activeAug 27, '09 at 7:39p



site design / logo © 2018 Grokbase