Without version ranges, how do I write a library that works with SLF4J version 1.5.*, but does not work with SLF4J 1.6.*?

Do I depend on, say, version 1.5.11? Then when a user depends on my library, and on slf4j-api directly, specifying slf4j-api version 1.6.0 in his pom, Maven will link in 1.6.0. So that is pretty useless to me. If I find a way to enforce version 1.5.11. Then I am loosing the ability to upgrade to any future version 1.5.*.

Cheers,
Jesse

On 28/09/2012 01:20, Baptiste MATHUS wrote:
+1.
Version ranges are basically just a bad practice in my experience. I mostly
don't see any interest apart from being able to see a normally passing
build suddenly going rogue because you somehow had a dependency update
somewhere in the dependency tree. (I wrote something similar in that
comment
http://www.sonatype.com/people/2012/08/download-it-all-at-once-a-maven-idea/#comment-635524577
)

So, please, Maven users, don't use them. It's like having scripts inside
your pom.xml, it might seem sexy and powerful, but it's dangerous.
Nail down a version, and upgrade explicitly when you need to and/or are
ready to. You'll be very happy that way and your build'll stay green.

Cheers



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to