On Tue, Jul 10, 2007 at 03:41:23PM -0400, Russell Gold spake thus: > I have a complex of projects that I want to manage. Essentially, it > consists of a number of "master" projects, each of which in turn > consists of a number of builds. A rule that I need to follow is that if > any two builds refer to the same artifact, they must use the same > version - even if they do not depend on each other, or are in separate > master projects. If master project A picks up a new version of master > project B, and one of the latter's builds has move to a new version of > one of its dependencies, the next time I build master project A, any of > its builds that uses that dependency must also move to the new version. > > Now, I know of a way to do this using custom ant tasks and a new form of > configuration file for the master project - but I would prefer not to > re-invent the wheel if Maven already has a solution (or if not, is it a > capability that Maven users would like...?)
Sure, maven can do this. In fact, any project that contains multiple subprojects (which would include any project that produces more than a single artifact) is probably organized to take advantage of the feature. Basically, you declare your common dependencies (specifying version numbers, etc) in the 'dependencyManagement' section of a pom.xml file that your subproject builds reference as their "parent" (and override settings as necessary). The subproject builds declare their dependencies in the 'dependencies' section of their pom.xml files, and get the version specified in the parent pom.xml. Google for 'dependencyManagement', and you should find everything you need to get this going. HTH, -Al -- :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: Alan D. Salewski Software Developer Health Market Science, Inc. :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
