You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alberto Ivo <al...@gmail.com> on 2013/02/05 13:57:16 UTC

What does this version means?

Hello,

I saw this version in a lib I want to put in my project and did'nt
understand what does that mean and didn't find in a maven tutorial.. could
anyone explain, please?

<dependency>
                                ...
<!-- Latest 2.3.x (not 2.4.x), at least 2.3.19 -->
* <version>[2.3.19,2.4)</version>*
</dependency>

Re: What does this version means?

Posted by Alberto Ivo <al...@gmail.com>.
Thanks Stephen.. That haelp me a lot!!!


Ivo


On Tue, Feb 5, 2013 at 11:06 AM, Stephen Connolly <
stephen.alan.connolly@gmail.com> wrote:

> Note that you don't need to add the comments (or even the exclusion) but
> these help you later on decipher the intent
>
>
> On 5 February 2013 13:05, Stephen Connolly
> <st...@gmail.com>wrote:
>
> > It is a version range.
> >
> > The [ and ] brackets indicate inclusive end-points, while ( and ) are
> > exclusive end points, so
> >
> > [2.3.19 means >=2.3.19
> > 2.4) means < 2.4
> >
> > However, due to how versions are compared, there can be strange versions
> > that creep into the range.
> >
> > My recommendation is to add an exclusion on that library to your pom and
> > add back in a specific version in order to ensure a reproducible build,
> e.g.
> >
> > if your <dependency> is currently:
> >
> >   <dependency>
> >     <groupId>com.foo.bar</groupId>
> >     <artifactId>manchu</artifactId>
> >     <version>1.3.4</version>
> >   </dependency>
> >
> > and the com.foo.bar:manchu:1.3.4 pom is the one containing the version
> > range, I would change *your* reference to:
> >
> >   <dependency>
> >     <groupId>com.foo.bar</groupId>
> >     <artifactId>manchu</artifactId>
> >     <version>1.3.4</version>
> >     <exclusions>
> >       <exclusion>
> >         <!-- excluding transitive version range to gain stable build -->
> >         <groupId>org.something.else</groupId>
> >         <artifactId>some-dep</artifactId>
> >       </exclusion>
> >     </exclusions>
> >   </dependency>
> >   <dependency>
> >     <!-- adding back transitive dependency from com.foo.bar:manchu with
> > pinned version -->
> >     <groupId>org.something.else</groupId>
> >     <artifactId>some-dep</artifactId>
> >     <version>2.3.21</version>
> >   </dependency>
> >
> > Hope that helps
> >
> >
> > On 5 February 2013 12:57, Alberto Ivo <al...@gmail.com> wrote:
> >
> >> Hello,
> >>
> >> I saw this version in a lib I want to put in my project and did'nt
> >> understand what does that mean and didn't find in a maven tutorial..
> could
> >> anyone explain, please?
> >>
> >> <dependency>
> >>                                 ...
> >> <!-- Latest 2.3.x (not 2.4.x), at least 2.3.19 -->
> >> * <version>[2.3.19,2.4)</version>*
> >> </dependency>
> >>
> >
> >
>

Re: What does this version means?

Posted by Stephen Connolly <st...@gmail.com>.
Note that you don't need to add the comments (or even the exclusion) but
these help you later on decipher the intent


On 5 February 2013 13:05, Stephen Connolly
<st...@gmail.com>wrote:

> It is a version range.
>
> The [ and ] brackets indicate inclusive end-points, while ( and ) are
> exclusive end points, so
>
> [2.3.19 means >=2.3.19
> 2.4) means < 2.4
>
> However, due to how versions are compared, there can be strange versions
> that creep into the range.
>
> My recommendation is to add an exclusion on that library to your pom and
> add back in a specific version in order to ensure a reproducible build, e.g.
>
> if your <dependency> is currently:
>
>   <dependency>
>     <groupId>com.foo.bar</groupId>
>     <artifactId>manchu</artifactId>
>     <version>1.3.4</version>
>   </dependency>
>
> and the com.foo.bar:manchu:1.3.4 pom is the one containing the version
> range, I would change *your* reference to:
>
>   <dependency>
>     <groupId>com.foo.bar</groupId>
>     <artifactId>manchu</artifactId>
>     <version>1.3.4</version>
>     <exclusions>
>       <exclusion>
>         <!-- excluding transitive version range to gain stable build -->
>         <groupId>org.something.else</groupId>
>         <artifactId>some-dep</artifactId>
>       </exclusion>
>     </exclusions>
>   </dependency>
>   <dependency>
>     <!-- adding back transitive dependency from com.foo.bar:manchu with
> pinned version -->
>     <groupId>org.something.else</groupId>
>     <artifactId>some-dep</artifactId>
>     <version>2.3.21</version>
>   </dependency>
>
> Hope that helps
>
>
> On 5 February 2013 12:57, Alberto Ivo <al...@gmail.com> wrote:
>
>> Hello,
>>
>> I saw this version in a lib I want to put in my project and did'nt
>> understand what does that mean and didn't find in a maven tutorial.. could
>> anyone explain, please?
>>
>> <dependency>
>>                                 ...
>> <!-- Latest 2.3.x (not 2.4.x), at least 2.3.19 -->
>> * <version>[2.3.19,2.4)</version>*
>> </dependency>
>>
>
>

Re: What does this version means?

Posted by Stephen Connolly <st...@gmail.com>.
It is a version range.

The [ and ] brackets indicate inclusive end-points, while ( and ) are
exclusive end points, so

[2.3.19 means >=2.3.19
2.4) means < 2.4

However, due to how versions are compared, there can be strange versions
that creep into the range.

My recommendation is to add an exclusion on that library to your pom and
add back in a specific version in order to ensure a reproducible build, e.g.

if your <dependency> is currently:

  <dependency>
    <groupId>com.foo.bar</groupId>
    <artifactId>manchu</artifactId>
    <version>1.3.4</version>
  </dependency>

and the com.foo.bar:manchu:1.3.4 pom is the one containing the version
range, I would change *your* reference to:

  <dependency>
    <groupId>com.foo.bar</groupId>
    <artifactId>manchu</artifactId>
    <version>1.3.4</version>
    <exclusions>
      <exclusion>
        <!-- excluding transitive version range to gain stable build -->
        <groupId>org.something.else</groupId>
        <artifactId>some-dep</artifactId>
      </exclusion>
    </exclusions>
  </dependency>
  <dependency>
    <!-- adding back transitive dependency from com.foo.bar:manchu with
pinned version -->
    <groupId>org.something.else</groupId>
    <artifactId>some-dep</artifactId>
    <version>2.3.21</version>
  </dependency>

Hope that helps


On 5 February 2013 12:57, Alberto Ivo <al...@gmail.com> wrote:

> Hello,
>
> I saw this version in a lib I want to put in my project and did'nt
> understand what does that mean and didn't find in a maven tutorial.. could
> anyone explain, please?
>
> <dependency>
>                                 ...
> <!-- Latest 2.3.x (not 2.4.x), at least 2.3.19 -->
> * <version>[2.3.19,2.4)</version>*
> </dependency>
>