I expect Maven to check all possible versions that match the range criteria
and to pick the highest one. (Sorry if I might not grasp your question)

The suffixes (-SNAPSHOT) in version ranges do not work as a filter.
(Probably this is not the point?)

The mentioned version strings (6.7.1-SNAPSHOT, 6.7.2-SNAPSHOT and
6.7.3-SNAPSHOT) are all higher than “6.7.0” and lower than “7.0.0-SNAPSHOT“.


On Tue, Nov 10, 2020 at 10:34 Maxim Solodovnik <[email protected]> wrote:

> Thanks for the quick answer Tomo,
>
> According to out build logs (available for ex. here [1])
> `7.0.0-SNAPSHOT` in the range results in checking all snapshot versions in
> all snapshot repositories available
>
> so 6.7.1-SNAPSHOT, 6.7.2-SNAPSHOT, 6.7.3-SNAPSHOT etc are being checked ...
> Is this expected
>
>
> https://ci-builds.apache.org/job/OpenMeetings/job/openmeetings/133/consoleFull
>
>
>
> On Tue, 10 Nov 2020 at 21:49, Tomo Suzuki <[email protected]>
> wrote:
>
> > I avoid using version ranges because it introduces unexpected results in
> > the dependency graphs.
> >
> > > [6.7.0,7.0.0-SNAPSHOT)
> >
> > I felt the intention of the range is the highest version before
> > 7.0.0-SNAPSHOT (without including 7.0.0-SNAPSHOT version).
> > As per [1], this range includes versions such as "7.0.0-alpha" and
> > "7.0.0-rc".
> >
> > [1]:
> >
> >
> https://maven.apache.org/ref/3.6.3/maven-artifact/apidocs/org/apache/maven/artifact/versioning/ComparableVersion.html
> > ,
> >
> >
> >
> > On Tue, Nov 10, 2020 at 8:54 AM Maxim Solodovnik <[email protected]>
> > wrote:
> >
> > > Hello Maven experts,
> > >
> > > one sub-dependencies of our project has following
> > >   <version>[6.7.0,7.0.0-SNAPSHOT)</version>
> > > [1]
> > >
> > > as a result metadata for all available SNAPSHOT version is being
> checked
> > in
> > > all SNAPSHOT repositories
> > > this takes time
> > > (full story is here https://groups.google.com/g/kurento/c/7B5k_cZ2Ya0)
> > >
> > > this is reproducible using both local build and build at
> > > ci-builds.apache.org
> > >
> > > Is this expected behavior?
> > > Is it Ok to use range dependency with SNAPSHOT in release version of
> > > library?
> > >
> > >
> > >
> > > [1]
> > >
> > >
> >
> https://repo1.maven.org/maven2/org/kurento/kms-api-elements/6.15.0/kms-api-elements-6.15.0.pom
> > >
> > > --
> > > Best regards,
> > > Maxim
> > >
> >
> >
> > --
> > Regards,
> > Tomo
> >
>
>
> --
> Best regards,
> Maxim
>
-- 
Regards,
Tomo

Reply via email to