• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best practices for setting up modules with interdependencies in CVS

 
Ram Charan
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have an application with a huge codebase with 7-10 modules in it. Some of these modules are J2EE apps, others are J2SE process and others are common & framework modules. As of today, all the code is in a single CVS module with make files to build and package (Solaris packaging). We are looking for ways to modularize this code base and split it into individual modules with dependencies reflecting the architectural relationships. For EX: Module 1 requires Module 3 and 4 etc. Can you guys provide some tips on how to do this? Are there any best practices?

Thanks,
Asia
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34202
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ram,
I recommend making each J2EE module (jar, ejb jar, framework module, etc) into a separate CVS project. This allows you to version each separately. You can manage dependencies through IDE files if you are all using the same IDE. For example, Eclipse provides the .classpath file. Either way, you will want to update your build script (ant, maven, make) to build the app from modules into an ear.
 
roger wong
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:Ram,
I recommend making each J2EE module (jar, ejb jar, framework module, etc) into a separate CVS project. This allows you to version each separately. You can manage dependencies through IDE files if you are all using the same IDE. For example, Eclipse provides the .classpath file. Either way, you will want to update your build script (ant, maven, make) to build the app from modules into an ear.


HI,

Does cvs support that modules have their versions?

Or is their a workround to do so use modules rather than cvs projects?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The unquestioned king of managing dependencies is Maven. Dependency management is one of the things it was explicitly designed to handle, and it not only handles dependencies between your own resources, but public resources as well - for example the Jakarta projects. Ivy is a facility that allows Ant to work with dependencies, but it's not a core part of Ant, the way it is in Maven.

Using IDEs for dependency management is something I do NOT recommend. I've been burned VERY badly at multiple times and in multiple shops by setups where critical build activities could only be done via IDE - or worse, a specific version of an IDE and/or configured EXACTLY as programmer "Joe" had his IDE configured.

My policy on IDEs is that they're great places to work, but when it comes time to do a production build, I want it buildable from the command line, far from any IDEs or even GUIs.

Maven, by the way, tends to encourage breaking down projects and sub-projects by module. With relatively little effort, you can pull a component, do a maven build-and-install operation and publish the updated component to your shop's Maven repository.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34202
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
roger wong wrote:
Jeanne Boyarsky wrote:Ram,
I recommend making each J2EE module (jar, ejb jar, framework module, etc) into a separate CVS project. This allows you to version each separately. You can manage dependencies through IDE files if you are all using the same IDE. For example, Eclipse provides the .classpath file. Either way, you will want to update your build script (ant, maven, make) to build the app from modules into an ear.


HI,

Does cvs support that modules have their versions?

Or is their a workround to do so use modules rather than cvs projects?

You tag the CVS projects. An application requires certain tagged versions. CVS doesn't have this concept of submodules within a project. Instead, you have projects within a repository. Which is what you have in Eclipse as well. Projects in a workspace.
 
roger wong
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:
roger wong wrote:
Jeanne Boyarsky wrote:Ram,
I recommend making each J2EE module (jar, ejb jar, framework module, etc) into a separate CVS project. This allows you to version each separately. You can manage dependencies through IDE files if you are all using the same IDE. For example, Eclipse provides the .classpath file. Either way, you will want to update your build script (ant, maven, make) to build the app from modules into an ear.


HI,

Does cvs support that modules have their versions?

Or is their a workround to do so use modules rather than cvs projects?

You tag the CVS projects. An application requires certain tagged versions. CVS doesn't have this concept of submodules within a project. Instead, you have projects within a repository. Which is what you have in Eclipse as well. Projects in a workspace.


Clear. Many Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic