Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

CVS Best Practices for Java Apps  RSS feed

 
Jamie Jackson
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone point me to a treatise on version control of Java Web apps? (We use CVS.)

Here are some specific points of confusion:
*(This one's not specific to Web apps.) Do you represent the whole directory structure of a package in a module in CVS? (e.g., com/myDomain/myThing). If so, I guess you'd need to keep all of your package source in separate working directories. :-?
*A Java Web app might have associated Struts artifacts, JSPs, Java source, Hibernate artifacts burrowed into the classes directory, etc., and I'm not sure where all this stuff needs to go to stay synchronized. Make a module from the whole WAR and include a src directory under that?

^The above might not make any sense (I'm a rookie), so keep that in mind. ;-)

Thanks,
Jamie
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I modeled my build script after the one used to build Tomcat.
This is a great example of how ANT, and CVS can work together.

Go to this page:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/building.html

On it, under the "Building Tomcat" section, you will find this link:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/build.xml

If you have ANT and a j2sdk set up on your machine, you can just download the build script and run ant from the directory where you put it.

It will pull all of the Tomcat source from CVS. It will also go and download all the needed dependencies from the proper places, compile everything, , javadoc everything, package everything, an build a complete instance of Tomcat from one command.

I don't think you'll find a better example of how to manage a large complicated project with CVS and ANT.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always browse the CVS repository of any Apache project, as well.
http://jakarta.apache.org/site/cvsindex.html

It's alway nice to see how others are doing it.
 
Jamie Jackson
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great, good examples are just the sort of thing I need. I guess I'll need to start getting comfy with ANT now. (Boy, learning Java is fraught with tangents!)

Thanks,
Jamie
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jamie Jackson:
(Boy, learning Java is fraught with tangents!)


Programming is fraught with tangents.
Think of how miserably boring it would be otherwise.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!