I ran both the todo and method-comments examples via
Ant and although both specify a .txt file for output,
and that file was created, neither actually had the
output in it. In both cases I saw the text appear via
stdout in Ant:
method-comments:
[echo] Writing build/examples/method-comments.txt
[vdoclet] * vdoclet.Generator.getOutputDir
[vdoclet] Get the output directory
[vdoclet] * vdoclet.Generator.getContext
[vdoclet] Get the evaluation-context used by this
generator
[vdoclet] * vdoclet.Generator.setAttribute
[vdoclet] Add something to the Generator's
evaluation-context
...
But that same text did not actually appear in
method-comments.txt. Instead the file was empty. The
same results were obtained for the todo task. Does the
"out" attribute of the task not work?
I would really really much rather use this than
XDoclet, it definitely seems less complex and I've
stuck Velocity into a couple of things already when I
just needed a quick template system so I'm comfortable
with it.
Logged In: YES
user_id=37658
I went ahead and figured it out myself. In the Main.java
file the following:
generator.eval( _controlTemplateResourceName,
new OutputStreamWriter(System.out) );
should read like this:
generator.eval( _controlTemplateResourceName,
_controlOutput);
Then the output goes to the specified file as it should.