views:

77

answers:

2

Hi

I have a slight issue with the version numbering in my projects.

Say for example that I have 4 classes One Two Three Four

The first time that I release this software, it will be labeled as version 1.0.0

In my java doc comment, for all classes, I have it as @version 1.0.0

So now test sends it back with a bug in class Two

I update class Two and now have to release version 1.0.1

Do I now update the @version tag in every class?

Or do I eventually just end up with a bunch of classes with different version numbers in the javadoc comments?

A: 

I believe the correct answer is just changing those files affected by the bug.

I would leave the versions or revisions to your control version. In a perfect world, a script would keep the version in sync.

Of course, this question is subjective. If you are intending the version tag as a marketing tool, then yes, you probably want to keep all your code saying the same version.

eipipuz
A: 

I think bug fixes don't affect this at all, because when fixing a bug, you only change a revision number (the 3rd one) in version number. And you don't have to put a revision number in your javadoc - it's useless there because javadoc is used to describe API and API does not change with fixing a bug.

That means you should put only for example @version 1.2 and not @version 1.2.6

Your javadoc only changes when you change your API - than you have to change a major (1st) or minor (2nd) version number and that should be projected in your javadoc..

I think you should change only version numbers in classes that have changed, because other classes are "inherited" from previous versions and thus version number in not changed classes should stay as they are. But I'm not sure about that..

Martin Lazar