Forums Register Login

Javadoc not generating @version

+Pie Number of slices to send: Send
I have specified a version tag like so:



However, it will still display in the browser as:



If I specify an actual version instead of %I%, then it displays the version.

I am generating this javadoc from the command line, not from an IDE. I am also using the -version switch.
+Pie Number of slices to send: Send
Hi Charles,

I had to puzzle for a bit to figure out what you were talking about, but a visit to the Javadoc man page revealed this:


The Java Software convention for the argument to the @version tag is the SCCS string "%I%, %G%", which converts to something like "1.39, 02/28/97" (mm/dd/yy) when the file is checked out of SCCS.



Ah! SCCS is an (old-fashioned!) source-code version control system, like CVS, Perforce, Subversion, SourceSafe, etc. If you put "%I%, %G%" into a text file and then store that file in SCCS, when you check it back out, SCCS will expand the text to the file version and date, as shown; the checked out file will no longer contain the "%I%" stuff, but the actual version number. Javadoc will then dutifully use the expanded text to produce documentation. Nowhere in the Javadoc documentation does it mean to imply that Javadoc uses this syntax for anything -- it does not!

Some other version control systems have similar magic tags; for instance in RCS or CVS, you can use "$Id$" to do something very similar.

In any case, if you're not using one of those source-code control systems, then just use an explicit version -- if you feel such a thing would be meaningful.
+Pie Number of slices to send: Send
It would make sense that these tags would have to be used in conjunction with a version-control system. How else would you know what version you're dealing with? Something needs to store the versioning somewhere.

I have both CVS and Subversion installed with my Netbeans IDE, so I will give it a whirl there.

Thanks for the info.
I'm not sure if I approve of this interruption. But this tiny ad checks out:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 2622 times.
Similar Threads
Enums Problem
Trying to invoke javadoc tag within Ant problem.
java doc forkAndExec native error
How to add @version javadoc tag in MyEclipse
package.html in src - should it be removed?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 09:26:40.