• Post Reply Bookmark Topic Watch Topic
  • New Topic

Javadoc not generating @version  RSS feed

 
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Charles Owen
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!