<editorial BS> Version ranges are pure evil if you want to have repeatable builds and want some idea about what you are testing and deploying. They seem to be used as an alternative to thinking. <End of editorial BS> I do have some ideas that I hope will help. On 13/05/2011 11:42 AM, Paul French wrote: I've added the below to the discussion at...Adding a method to B will not affect A, A can depend on [1.2.0-SNAPSHOT] since the methods that it will call are still there. OTOH, there is no need to change A since it will be perfectly happy with B[1.1.0] and any subsequent version of B that is upwards compatible. You can compile with [1.1.0] and execute with any later version of B. Is B's scope in A "provided" or "compile"? Compile will include B[1.1.0] in A's jar and that may be perfectly alright. Provided will have A using whatever version of B that you provide. So don't. Stick with A's original designed dependency B[1.1.0]. When you revisit A and start to use the new method, it will then depend on the current production release of B or some SNAPSHOT if you want to use A to test B. Never release anything with a SNAPSHOT dependency if you want to be able to maintain it since you have no idea what code is in a SNAPSHOT. Could be ready to release or in the middle of development. That is why it is not a Release. SNAPSHOTS are unstable and do not come with a warranty of usability or any fixed specification. RELEASES are stable and come with a warranty and a known specification. That is what you want to run in production.
Just pick 1 version and make sure that you do not break upwards compatibility without going back and fixing A.
I hope that no one else is even thinking about this kind of development chaos. Go back to the drawing board and think about what a dependency actually means - at compile time, at execution time. Pay particular attention to how you are going to know what code is actually going to be run when the application is in production. Think about what upwards compatibility actually means. You are taking advantage of upwards compatibilty all the time with third party software. You do not go through all your code and change the dependencies on the Java Servlet Engine or log4j everytime your system admin upgrades Tomcat. You pray (the system admin probably more than you) that the new version of Tomcat will still run your application even though the versions have all gone up by big amounts. You are making a lot of extra work for a negative return. Free advice. Do as you wish with it. Ron
|
- maven 3 version ranges with snapshots Paul French
- Re: maven 3 version ranges with snapshots Ron Wheeler