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 22:58:47 GMT
On Friday, December 12, 2003, at 03:10  PM, Matt Harp wrote:
> 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 :)

Manning has an XDoclet in Action book that is hot off the press.  It 
rocks!  (ObDisclaimer: I was the tech. reviewer of it)

<http://www.manning.com/walls/>

XDoclet has tons of reference material on their site, but yes it is 
short on the how-to.  There are lots of articles about it.  I wrote one 
for JavaPro that published in their online offerings:

	<http://www.ftponline.com/javapro/2003_07/online/ehatcher_07_25_03/>

(pointers to the first two parts on that one)

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

Help always appreciated.  Just hop on the dev list when you're ready 
and submit patches and comments.

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

The idea is for it to become the mechanism.  And some task docs are 
generated that way, but in a less-than-automated fashion.

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

The current docs are static HTML files that are maintained separately 
from the source code.  And as you might expect, things can easily get 
out of sync.

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

Just to be precise, you mean Task, not AntTask I presume.

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

This is exactly what proposal/xdocs does.  So you're on the right 
track.  Keep pressing on.  Don't give up too easily.  This is open 
source, baby.... you gotta have a little perseverance and bear with bad 
or missing docs and startup learning curves :))  (otherwise you'd pay 
me to come do it for you, right?)

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

This is the primary use of XDoclet in the mainstream.  It can do tons 
more.... any time the source of metadata is .java files then XDoclet is 
one of the tools of choice.

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

I guess the error message was informative then :)

	Erik


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


Mime
View raw message