tags:

views:

26

answers:

2

I'd like to document J2EE components that we create. Our ant scripts have targets to build them all. I was wondering if there is anything like "javadoc" for an ant script. In other words, I could annotate the ant targets:

<target name="some.war'>
  <antdoc>
      This war file provides the user interface for the foo application.
  </antdoc>
...
</target

Does this even seem like a good idea? Maybe I'm better off creating a regular document.

+2  A: 

Ant has a description tag:

 <target name="some.war">
    <description>
           This war file provides ...
    </description>
  </target>

I think that is as good as it gets. I think it is a good idea and use it all the time. Most tasks have description attribute as well, which is good for short descriptions.

Yishai
+1  A: 

At the build script level, you could use the description attribute of a <target>:

<target name="some.war" 
 description"This war file provides the user interface for the foo application.">
...
</target>

But, more important, be sure these details are provided in the <description> element of the web.xml of a WAR and/or the application.xml of an EAR.

Pascal Thivent