On 2/29/08, Jörg Schaible <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>  > On 2/29/08, Jörg Schaible <[EMAIL PROTECTED]> wrote:
>  >> sebb wrote:
>  >>  > On 28/02/2008, James Carman <[EMAIL PROTECTED]> wrote:
>  >>  >> All, >>
>  >>  >>  In Proxy, I currently have my SLF4J dependency version declared
>  >>  >> like this: >>
>  >>  >>  <dependency>
>  >>  >>   <groupId>org.slf4j</groupId>
>  >>  >>   <artifactId>slf4j-api</artifactId>
>  >>  >>   <version>[1.4.0,)</version>
>  >>  >>   <optional>true</optional>
>  >>  >>  </dependency>
>  >>  >>
>  >>  >>  With this, maven will download the latest version of SLF4J
>  >>  (1.5.0 I >>  believe) and use that during the build.  Do we have an
>  >>  official >>  policy regarding our dependency versions in our poms?
>  >>  > > Note that proxy trunk used to depend on [1.3.0.) - this builds
>  >>  and > tests OK using M2, even though one of the proxy classes uses
>  >>  a method > that was not introduced until 1.4.0. It was only because
>  >>  I happened to > try building proxy without Maven that the problem
>  >> was noticed.
>  >>
>  >>
>  >> Why do you wanna use locked versions at all? If you put
>  >>
>  >>
>  >>  <version>1.4.0</version>
>  >>
>  >>
>  >> into the POM, you are using this version unless it is
>  > overwritten by a dependencyManagement section or version
>  > resolution. We don't have currently any possibility anyway to
>  > test all versions of an artifact from 1.4.0 to latest 1.5.x
>  > in all combinations. So the single version simply states what
>  > you have used to test and build your package. Otherwise you
>  > would have to check any permutation.
>  >>
>  >>
>  >
>  > So, are you saying we should use "1.4.0" or "[1.4.0,)"?
>
>
> 1.4.0, but just my 2 cent
>
>  - Jörg
>
>  BTW: If you *know* that 1.5 is incompatible, then you may always use a range 
> like [1.4.0,1.5.0), but you will have to ensure manually first, that 1.4.0 
> really can be used.
>

I thought I checked 1.3.0, but apparently I didn't.  I changed it to
specifically 1.3.0 and then hit the little refresh button in IntelliJ
IDEA.  Apparently that didn't work!  So, I did a build with 1.4.0
specifically set using Maven and it worked.

In this particular case, I don't really care.  My dependency is
optional anyway, so someone is going to have to specifically include
it in their pom if they want to use Proxy.  I just ran across the
version range stuff recently and thought that was the way folks were
supposed to do it.  But, Maven is smart enough to use the best version
possible if a project includes Proxy and wants to use a newer version
of SLF4J than what Proxy's pom uses.

>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to