Results 1 to 6 of 6
- 03-30-2011, 01:19 PM #1
Member
- Join Date
- Mar 2011
- Posts
- 3
- Rep Power
- 0
Version tagging CVS repository files from Java or ANT
Let me give you the rundown first:
- Our code is stored on remote CVS repository. (Accessed from Eclipse IDE)
- Each person on the team can check out a project, compile a product release locally (using an ANT built script) and distribute it to a file server.
At the moment, after building a new release, we have to manually update the Version tags on the CVS repository to match the newly released build. We do this in Eclipse by right-clicking on the project root > Team > Tag as Version.... and then typing in the incremented version number.
I would like to automate this so that after a new release is built, the new version number is automatically applied to files on the CVS repository. An ANT script solution or Java coded solution (defined as an ANT task) will do.
I have spent hours searching forums for a solution but nothing matches my exact problem. I have looked at both JCVS and Netbeans' JavaCVS but they seem to be orientated more towards a GUI than allowing their classes to be used for a single tag-as-version command. PLEASE HELP!
- 03-31-2011, 05:02 AM #2
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
From your description, it sounds like you're doing things backward. You should be doing the tag prior to the build and distribution. How do you even know what you're building otherwise?
But, if for some reason you can't change that process, I suggest adding a file who's only purpose in life is to contain a $Version tag. Then you could easily read that in and spawn the appropriate CVS command.
- 03-31-2011, 06:43 AM #3
Member
- Join Date
- Mar 2011
- Posts
- 3
- Rep Power
- 0
You assume correctly. We are doing things slightly backward... but this is they way it has been done for years apparently. I only recently joined the company so I can't change the process. :D
We already have a file keeping track of the current version as you suggested. It's the way of using that to tag the CVS with java that is the mystery. I don't know what java library to use and how to use it. There is Jcvs but it's GUI based.
- 04-01-2011, 05:12 AM #4
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
It's difficult to give much advice, because I really don't understand what you're trying to do. If the files have not already been tagged, then assigning a tag is arbitrary. Use whatever standard your company uses and do a 1 up counter, or something like that, from the previous tag.
You can read in the previous version tag from the magic file using a script or java, and parse it to find the previous tag. Then apply whatever transformation you want to create a new tag name, and call the appropriate 'cvs tag' command using that name. As opposed to doing in a build script, I'd write a checkout script/program that does this, so everything is tagged an ready to go before you even start editing.
- 04-01-2011, 09:46 AM #5
Member
- Join Date
- Mar 2011
- Posts
- 3
- Rep Power
- 0
All I want to know is how to issue the cvs-command from within my java code.
- 04-04-2011, 05:05 AM #6
Senior Member
- Join Date
- Jan 2009
- Posts
- 671
- Rep Power
- 5
Similar Threads
-
Version of java
By waqar100 in forum New To JavaReplies: 3Last Post: 06-04-2010, 04:29 AM -
java -version pointing to older version
By deepakts in forum New To JavaReplies: 4Last Post: 05-06-2010, 09:59 AM -
Creating my own plug-in repository
By mark.bramnik in forum EclipseReplies: 0Last Post: 07-05-2009, 12:06 PM -
Adding recieved items to Server repository.
By nel636 in forum New To JavaReplies: 1Last Post: 11-28-2008, 01:46 PM -
version of java????
By j2vdk in forum New To JavaReplies: 6Last Post: 09-07-2008, 04:34 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks