ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Simple XDoclet exmple?
Date Fri, 12 Dec 2003 19:30:51 GMT
Matt,

You are venturing into an area where very few folks have spent time.  I 
wrote this XDoclet infrastructure to generate the task reference 
appendix of our book, and I've been outspoken on promoting it as the 
wave of the future for Ant documentation.  I have not done much beyond 
promoting it through - it really needs attention to take it to the next 
level of integration.  I currently don't have the free time to devote 
to it myself, unfortunately.

Some more responses below....

On Friday, December 12, 2003, at 09:58  AM, Matt Harp wrote:
> I've written a new Task for my local Ant builds and want to generate 
> the
> Help files like you see in the Ant manual. From what I've read, the 
> stuff in
> proposal/xdocs is setup to do this for the Ant source files. For the 
> life of
> me though, I can't understand how to use it locally...

I know Steve used it to generate documentation for the Apache Axis 
tasks, so you might find something in that project that helps.  The 
build.xml in proposal/xdocs is set up so the property src.dir points to 
the source directory to process.  Overriding that is really all that 
should be needed.

Keep in mind that the Ant version you are running with needs to match 
the source code you're processing - this is most relevant when 
processing Ant's own source directory.

>  I've spent a day+ now
> trying to get the proposal\xdocs\build.xml to build but all I ever get 
> is
> UnexpectedError messages (I've increased the JVM mem default to 256m in
> ANT_OPTS but all that fixed was my OutOfMemory errors).

Any other details to those error messages that seem important?  Does a 
-debug run provide more clues?

> Can anyone provide just a simple example (like 1 Java class that 
> inherits
> from AntTask and a build.xml file) of how to use XDoclet to generate 
> Html
> files like those seen in the Ant manual?

The Ant manual is *not* currently generated this way.  It is my hope 
that eventually it will be.  Peter (a committer) recently used it to 
generate the <subant> task documentation though, but he just copied 
over the results and committed that.

> Also, which XDoclet tag should I be using for just generic Java code? 
> All of
> them seem geared toward specific types of Java like Web, EJB, JDO, 
> etc...

I don't understand this question.  What do you want to do with the tag 
and generic Java code you describe?

Have a look at <http://www.ehatchersolutions.com/JavaDevWithAnt> 
project.  In the main build file, XDoclet is used to generate a 
.properties file from a custom Ant task (look at IndexTask) - it uses a 
custom XDoclet @tag and the generic <template> subtask and custom 
template to do the generation.  Is this along the lines of what you're 
after?

	Erik


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


Mime
View raw message