ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matt Harp" <mh...@seapine.com>
Subject RE: Simple XDoclet exmple?
Date Fri, 12 Dec 2003 20:10:00 GMT
Thanks for the info and help,

matt

> -----Original Message-----
> From: Erik Hatcher [mailto:erik@ehatchersolutions.com]
> Sent: Friday, December 12, 2003 2:31 PM
> To: Ant Users List
> Subject: Re: Simple XDoclet exmple?
>
>
> 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.

Well, I really hope to be able to use it to generate some documentation and
maybe even some code. My biggest complaint with it is that the XDoclet
website isn't very detailed with examples and usage ideas. All I've found is
mostly stuff on EJB, which doesn't pertain my situation. It seems like it'll
be really cool once I figure it out though :)

If I get some stuff working, I'm willing to help out with examples or what
not if you're interested in help. If so, let me know.


>
> 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?
>

Probably, but I don't feel like looking them up and what not :) I just
wanted to do it because I thought it generated the Ant documentation for the
manual pages. Since it doesn't I'm not really interested in getting it
working.

> > 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.
>

So then how is the Ant manual generated? This page is what I read that led
to me believe it was being built with XDoclet.

http://ant.apache.org/ant_task_guidelines.html near the bottom it talks
about the xdocs stuff.

I really like the Ant manual page layouts and would like to use it for my
tasks, and don't want to have to maintain html pages manually if I can avoid
it.


> > 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?

I have a mytask.java file which has the mytask class which inherits off of
AntTask. Then say I have a setMyAttrib method which can be true or false. I
want to be able to put some xdoclet tags about that set method that can then
be read by xdoclet and then generate an HTML table with the atribute name,
description, required? just like the Ant task manual pages have.

Basically, I want to create a page like this one
%ANT_HOME%\docs\manual\CoreTasks\get.html for the Get task that ships with
Ant, but for my new Ant task using the XDoclet stuff.

All the tasks though on the XDoclet page are for stuff like EJB, JDO, etc...
and seem to be geared toward code/config file generation. None of which
interests me right now.



>
> 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?

I have donwloaded the sample you point to, and finally found someone with a
j2ee.jar I could use so I'm gonna try the example out later today and see
what all it does.


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


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


Mime
View raw message