Imagine you've got the following component structure in your framework:
- main component (the included by your clients), let's call it MAIN
- MAIN depends on functional components A,B,C
- There are 2 helper components, X and Y, used by most modules
Now, the great thing about maven's transitive dependency resolution is that when a client wants to include your framework it can do so by just declaring one artifact in their POM, namely that of the MAIN component:
Maven will then automatically add modules A,B,C,X and Y to the client's project, neat !! The root component here effectively serves as a dependency abstraction, clients do not need to know anything else when they want to use my framework, this is a Good Thing really.
<dependency>
<groupId>my.framework</groupId>
<artifactId>main</artifactId>
<version>1.0</version>
</dependency>
Imagine now that I (the framework maintainer) make a small one-line fix to module Y and I'ld like to do a new release. There were minimal code changes, and I only changed one module, so I expect the release process to go fast and swift and in a few minutes my clients will be able to use the 1.0.1 release:
Right ?
<dependency>
<groupId>my.framework</groupId>
<artifactId>main</artifactId>
<version>1.0.1</version>
</dependency>
Wrong.
Here is what maven typically will force you to do:
- Release module Y
- Update the dependency of Y in module X, release module X
- Update the dependency of X in module A, release module A
- Update the dependency of X in module B, release module B
- Update the dependency of X in module C, release module C
- Update the dependency of A B C in MAIN and (finally) release MAIN
If the effort for a release turn-around becomes far too great then this can impact your project in different ways:
- no more release-early release-often
- each release will contain more code changes
- regressions become much harder to detect
- clients get frustrated because of the slow release cycle
- developers get frustrated by their inability to "get something out of the door quickly"
(This post is getting too long already, so I'll offer a solution to this in a next post.)
No comments:
Post a Comment