• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java, CVS and Ant - best practices?  RSS feed

 
B Hayes
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to design a development environment that would a) allow easy check-out of java projects for a particular IDE (in this case JDeveloper) and b) allow IDE independent builds.
I'm not really running into problems -- more design considerations.
What is the typical granularity of a CVS directory-structure. Project? Is it naughty to put IDE XML set-up data in the CVS? (for example a .prj file). And if so, then how do developers easily get all the dependency information for a project without having to create it from scratch?
Is it acceptable to put .jars in the CVS? If not, where are library .jars (like mail.jar and activation.jar) normally stored for deployment purposes? -- assuming that .jars should be distributed on a per-project basis (as I've read is good practice). And how do you hook them into a build via a "release tag" if they're not part of CVS?
I'm looking at Ant right now, but I'd like to get the above variables sorted out before doing builds.
Thanks.
 
Gaurav Mac Mathur
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, The Build process should be Independent of the Dev Env, and IDE.
use CVS and ANT is a good combination.
for development we use Makefile ( compiling some piece of code for testing ).
Well granularity of a CVS directory-structure depends on the Amount of code base and the Archecture, typically the diffrent layers ( UI/ Business/ Foundation/ Utilities / SQL,DDL ) are created as sub projects ( _ forgot teh correct term_) in CVS.
Of course .prj should not be checked in CVS.
but you can put 3rd party jars in CVS for easy access and you can replace them with latest versions time to time ( like xerces.jar, mail.jar and activation.jar etc. )
Ant is a real good option to be used with CVS and works fine.
Cheers anything alse i can help with
 
B Hayes
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm going to give you some real-life scenarios. Maybe you can comment.
A developer creates a project that requires JDBC, SQLJ, and JavaMail. He has to a) import all the source files/packages for his project, b) set up any library dependencies (so the IDE can compile/debug), and c) set up any deployment profiles (for his .jar/.war/.ear). Why, after doing all that work, wouldn't he share his .prj file? The CVS is going to determine the directory of the project structure anyway -- and therefore the .prj file should not be unique for each developer working on that project. It's one XML file that's at most 5k.
The same developer has several files (.jar, .txt, .csv, .bat, .cmd, and .exe) files that must be deployed with the application. I can see "readable" files going into cvs (although you're saying .jars could go in there). But what about .exes? (in this case it's an Oracle .exe).
I'm wondering about having a directory on a network drive that contains stuff that would normally go into CVS -- but isn't because it's an .exe, .dll or whatever. And maybe throwing .jars there too. .jars can be extremely large -- and I'm wondering if CVS is a good place for them since they're unreadable anyway.
I would assume that Ant could go to CVS and go to a network drive to get everything it needs for a build.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!