java library version numbering using eclipse
I'm developing a library connected SVN @sourceforge, My IDE is Eclipse, so how to setup version numbering ? I guess it's automatic but how do I do that using Eclipse开发者_StackOverflow ?
NOTE: I'm using Subclipse
I assume you're using Java and this is a new application. In that case I recommend setting up your project with Maven and using the Release plugin (http://maven.apache.org/plugins/maven-release-plugin/) or the Versions plugin (http://mojo.codehaus.org/versions-maven-plugin/). Here is a link on how to get started with the Versions plugin once you have Maven set up:
http://weblogs.java.net/blog/johnsmart/archive/2010/08/18/managing-version-numbers-maven-maven-versions-plugin
Subversion numbers the commits starting from one, nothing you could change about that. As plugin for svn you could use Subclipse or Subversive For the version numbers of your application you have to decide by yourself how to number it, and create a copy of the code in the svn repository, usually in the tag folder (while the main development would be in the tunk), a directory with the version number. You could do it with the features of whatever SVN plugin for eclipse you choose.
Your question is really vague. When you say "version numbering", I assume you mean Subversion revision numbering and not application version numbering (e.g., 1.0.0). And I'm also assuming that you're asking how to put revision numbers in comments of the file itself.
In the header of your files, you'll want to add the following:
$LastChangedDate:$
$LastChangedRevision:$
$LastChangedBy:$
Next in ~/subversion/config add the following:
[miscellany]
enable-auto-props = yes
[auto-props]
* = svn:keywords=LastChangedDate LastChangedRevision LastChangedBy Id
Finally in Eclipse go to Windows > Preferences > Team > SVN and set "Configuration location" to "Use directory" and select ~/subversion.
Source: http://islandlinux.org/howto/enable-auto-properties-auto-props-subversion-subclipse-eclipse
精彩评论