[jira] [Commented] (MRESOLVER-164) DefaultDependencyCollector filterVersions seems always return full version range

2021-02-22 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MRESOLVER-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17288819#comment-17288819
 ] 

Xiang Li commented on MRESOLVER-164:


I have commented on the same issue which open under MNG-7049, we could use that 
issue if it needs to move to MNG. 

I can help get a maven IT, since I have no experience with maven IT, I wonder 
if that is the right place for [maven 
IT|https://github.com/apache/maven-integration-testing] (which seems apply to 
maven core)? 

> DefaultDependencyCollector filterVersions seems always return full version 
> range
> 
>
> Key: MRESOLVER-164
> URL: https://issues.apache.org/jira/browse/MRESOLVER-164
> Project: Maven Resolver
>  Issue Type: Bug
>Affects Versions: 1.4.2, 1.6.1
>Reporter: Xiang Li
>Priority: Major
>
> Related to MNG-7049 but I think the root cause is in maven-resolver so I 
> opened a new issue. Correct me if it is better to still use the old ticket.
> During using version ranges, I notice that maven will download all poms from 
> a version range, which happen in that 
> [loop|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],
>  the reason is that 
> [verFilter|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
>  here seems return null. Since by default, versionFilter is set to null by 
> DefaultRepositorySystemSession, and I do not see many examples that 
> setVersionFilter get used for some reason. 
> Another thing that confuses me is that version range is resolved by 
> DefaultVersionRangeResolver in maven rather than maven-resolver here.
>  
> I wonder if it possible to set HighestVersionFilter 
> [here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
>  instead of return all version range results. I am happy to contribute a PR 
> with some guidance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MRESOLVER-164) DefaultDependencyCollector filterVersions seems always return full version range

2021-02-19 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MRESOLVER-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17287580#comment-17287580
 ] 

Xiang Li commented on MRESOLVER-164:


Really appreciate the help, that will help a lot with the version range usage. 
wonder if we can apply the extra properties to future maven versions 4.0.0 or 
if there will be 3.6.4. I am not familiar with the maven release plan.

> DefaultDependencyCollector filterVersions seems always return full version 
> range
> 
>
> Key: MRESOLVER-164
> URL: https://issues.apache.org/jira/browse/MRESOLVER-164
> Project: Maven Resolver
>  Issue Type: Bug
>Affects Versions: 1.4.2, 1.6.1
>Reporter: Xiang Li
>Priority: Major
>
> Related to MNG-7049 but I think the root cause is in maven-resolver so I 
> opened a new issue. Correct me if it is better to still use the old ticket.
> During using version ranges, I notice that maven will download all poms from 
> a version range, which happen in that 
> [loop|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],
>  the reason is that 
> [verFilter|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
>  here seems return null. Since by default, versionFilter is set to null by 
> DefaultRepositorySystemSession, and I do not see many examples that 
> setVersionFilter get used for some reason. 
> Another thing that confuses me is that version range is resolved by 
> DefaultVersionRangeResolver in maven rather than maven-resolver here.
>  
> I wonder if it possible to set HighestVersionFilter 
> [here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
>  instead of return all version range results. I am happy to contribute a PR 
> with some guidance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (MRESOLVER-164) DefaultDependencyCollector filterVersions seems always return full version range

2021-02-19 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MRESOLVER-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17287321#comment-17287321
 ] 

Xiang Li edited comment on MRESOLVER-164 at 2/19/21, 7:39 PM:
--

[~cstamas] Thanks for the reply, I did the same test which I basically add 
junit:[3.8.1, ] in this 
[pom|https://github.com/apache/maven-resolver/blob/maven-resolver-1.4.1/maven-resolver-demos/maven-resolver-demo-snippets/pom.xml]
 file and build the demo from `maven-resolver/maven-resolver-demos` and I have 

 
{code:java}
[INFO]
[INFO] ---< org.apache.maven.resolver:maven-resolver-demo-snippets >---
[INFO] Building Maven Artifact Resolver Demo Snippets 1.4.1   [2/3]
[INFO] [ jar 
]-Downloading from apache.snapshots: 
https://repository.apache.org/snapshots/junit/junit/maven-metadata.xml
Downloading from maven-public/junit/junit/maven-metadata.xml
Downloaded from maven-public/junit/junit/maven-metadata.xml (1.4 kB at 433 B/s)
Downloading from maven-public/junit/junit/3.8.2-brew/junit-3.8.2-brew.pom
Downloaded from maven-public/junit/junit/3.8.2-brew/junit-3.8.2-brew.pom (187 B 
at 89 B/s)
Downloading from maven-public/junit/junit/4.0/junit-4.0.pom
Downloaded from maven-public/junit/junit/4.0/junit-4.0.pom (210 B at 1.4 kB/s)
Downloading from maven-public/junit/junit/4.1/junit-4.1.pom
Downloaded from maven-public/junit/junit/4.1/junit-4.1.pom (583 B at 404 B/s)
Downloading from maven-public/junit/junit/4.2/junit-4.2.pom
Downloaded from maven-public/junit/junit/4.2/junit-4.2.pom (931 B at 766 B/s)
Downloading from maven-public/junit/junit/4.3/junit-4.3.pom
{code}
So do you think it might be some config issue if we have different behavior?

 


was (Author: xiangli1996):
[~cstamas] Thanks for the reply, when I hit that issue, I did the same test 
which I basically add junit:[3.8.1, ] in this 
[pom|https://github.com/apache/maven-resolver/blob/maven-resolver-1.4.1/maven-resolver-demos/maven-resolver-demo-snippets/pom.xml]
 file and build the demo from `maven-resolver/maven-resolver-demos` and I have 

 
{code:java}
[INFO]
[INFO] ---< org.apache.maven.resolver:maven-resolver-demo-snippets >---
[INFO] Building Maven Artifact Resolver Demo Snippets 1.4.1   [2/3]
[INFO] [ jar 
]-Downloading from apache.snapshots: 
https://repository.apache.org/snapshots/junit/junit/maven-metadata.xml
Downloading from maven-public/junit/junit/maven-metadata.xml
Downloaded from maven-public/junit/junit/maven-metadata.xml (1.4 kB at 433 B/s)
Downloading from maven-public/junit/junit/3.8.2-brew/junit-3.8.2-brew.pom
Downloaded from maven-public/junit/junit/3.8.2-brew/junit-3.8.2-brew.pom (187 B 
at 89 B/s)
Downloading from maven-public/junit/junit/4.0/junit-4.0.pom
Downloaded from maven-public/junit/junit/4.0/junit-4.0.pom (210 B at 1.4 kB/s)
Downloading from maven-public/junit/junit/4.1/junit-4.1.pom
Downloaded from maven-public/junit/junit/4.1/junit-4.1.pom (583 B at 404 B/s)
Downloading from maven-public/junit/junit/4.2/junit-4.2.pom
Downloaded from maven-public/junit/junit/4.2/junit-4.2.pom (931 B at 766 B/s)
Downloading from maven-public/junit/junit/4.3/junit-4.3.pom
{code}
So do you think it might be some config issue if we have different behavior?

 

> DefaultDependencyCollector filterVersions seems always return full version 
> range
> 
>
> Key: MRESOLVER-164
> URL: https://issues.apache.org/jira/browse/MRESOLVER-164
> Project: Maven Resolver
>  Issue Type: Bug
>Affects Versions: 1.4.2, 1.6.1
>Reporter: Xiang Li
>Priority: Major
>
> Related to MNG-7049 but I think the root cause is in maven-resolver so I 
> opened a new issue. Correct me if it is better to still use the old ticket.
> During using version ranges, I notice that maven will download all poms from 
> a version range, which happen in that 
> [loop|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],
>  the reason is that 
> [verFilter|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
>  here seems return null. Since by default, versionFilter is set to null by 
> DefaultRepositorySystemSession, and I do not see many examples that 
> setVersionFilter get used for some reason. 
> Another thing that confuses me is that version range is resolved by 
> DefaultVersionRangeResolver in maven rather than maven-resolver here.
>  
> I wonder if it possible to set HighestVersionFilter 
> 

[jira] [Commented] (MRESOLVER-164) DefaultDependencyCollector filterVersions seems always return full version range

2021-02-19 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MRESOLVER-164?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17287321#comment-17287321
 ] 

Xiang Li commented on MRESOLVER-164:


[~cstamas] Thanks for the reply, when I hit that issue, I did the same test 
which I basically add junit:[3.8.1, ] in this 
[pom|https://github.com/apache/maven-resolver/blob/maven-resolver-1.4.1/maven-resolver-demos/maven-resolver-demo-snippets/pom.xml]
 file and build the demo from `maven-resolver/maven-resolver-demos` and I have 

 
{code:java}
[INFO]
[INFO] ---< org.apache.maven.resolver:maven-resolver-demo-snippets >---
[INFO] Building Maven Artifact Resolver Demo Snippets 1.4.1   [2/3]
[INFO] [ jar 
]-Downloading from apache.snapshots: 
https://repository.apache.org/snapshots/junit/junit/maven-metadata.xml
Downloading from maven-public/junit/junit/maven-metadata.xml
Downloaded from maven-public/junit/junit/maven-metadata.xml (1.4 kB at 433 B/s)
Downloading from maven-public/junit/junit/3.8.2-brew/junit-3.8.2-brew.pom
Downloaded from maven-public/junit/junit/3.8.2-brew/junit-3.8.2-brew.pom (187 B 
at 89 B/s)
Downloading from maven-public/junit/junit/4.0/junit-4.0.pom
Downloaded from maven-public/junit/junit/4.0/junit-4.0.pom (210 B at 1.4 kB/s)
Downloading from maven-public/junit/junit/4.1/junit-4.1.pom
Downloaded from maven-public/junit/junit/4.1/junit-4.1.pom (583 B at 404 B/s)
Downloading from maven-public/junit/junit/4.2/junit-4.2.pom
Downloaded from maven-public/junit/junit/4.2/junit-4.2.pom (931 B at 766 B/s)
Downloading from maven-public/junit/junit/4.3/junit-4.3.pom
{code}
So do you think it might be some config issue if we have different behavior?

 

> DefaultDependencyCollector filterVersions seems always return full version 
> range
> 
>
> Key: MRESOLVER-164
> URL: https://issues.apache.org/jira/browse/MRESOLVER-164
> Project: Maven Resolver
>  Issue Type: Bug
>Affects Versions: 1.4.2, 1.6.1
>Reporter: Xiang Li
>Priority: Major
>
> Related to MNG-7049 but I think the root cause is in maven-resolver so I 
> opened a new issue. Correct me if it is better to still use the old ticket.
> During using version ranges, I notice that maven will download all poms from 
> a version range, which happen in that 
> [loop|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],
>  the reason is that 
> [verFilter|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
>  here seems return null. Since by default, versionFilter is set to null by 
> DefaultRepositorySystemSession, and I do not see many examples that 
> setVersionFilter get used for some reason. 
> Another thing that confuses me is that version range is resolved by 
> DefaultVersionRangeResolver in maven rather than maven-resolver here.
>  
> I wonder if it possible to set HighestVersionFilter 
> [here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
>  instead of return all version range results. I am happy to contribute a PR 
> with some guidance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (MRESOLVER-164) DefaultDependencyCollector filterVersions seems always return full version range

2021-02-18 Thread Xiang Li (Jira)


 [ 
https://issues.apache.org/jira/browse/MRESOLVER-164?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiang Li updated MRESOLVER-164:
---
Description: 
Related to MNG-7049 but I think the root cause is in maven-resolver so I opened 
a new issue. Correct me if it is better to still use the old ticket.

During using version ranges, I notice that maven will download all poms from a 
version range, which happen in that 
[loop|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],
 the reason is that 
[verFilter|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
 here seems return null. Since by default, versionFilter is set to null by 
DefaultRepositorySystemSession, and I do not see many examples that 
setVersionFilter get used for some reason. 

Another thing that confuses me is that version range is resolved by 
DefaultVersionRangeResolver in maven rather than maven-resolver here.

 

I wonder if it possible to set HighestVersionFilter 
[here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
 instead of return all version range results. I am happy to contribute a PR 
with some guidance.

  was:
Related to MNG-7049 but I think the root cause is in maven-resolver so I opened 
a new issue. Correct me if it is better to still use the old ticket.

During using version ranges, I notice that maven will download all poms from a 
version range, which happen in that 
[loop|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],
 the reason is that 
[verFilter|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
 here seems return null. Since by default, versionFilter is set to null by 
DefaultRepositorySystemSession, and I do not see many examples that 
setVersionFilter get used for some reason. 

Another thing that confuses me is that version range is resolved by 
DefaultVersionRangeResolver in maven rather than maven-resolver here.

 

I wonder if it possible to set HighestVersionFilter 
[here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
 instead of return all version range results.


> DefaultDependencyCollector filterVersions seems always return full version 
> range
> 
>
> Key: MRESOLVER-164
> URL: https://issues.apache.org/jira/browse/MRESOLVER-164
> Project: Maven Resolver
>  Issue Type: Bug
>Affects Versions: 1.4.2, 1.6.1
>Reporter: Xiang Li
>Priority: Major
>
> Related to MNG-7049 but I think the root cause is in maven-resolver so I 
> opened a new issue. Correct me if it is better to still use the old ticket.
> During using version ranges, I notice that maven will download all poms from 
> a version range, which happen in that 
> [loop|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],
>  the reason is that 
> [verFilter|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
>  here seems return null. Since by default, versionFilter is set to null by 
> DefaultRepositorySystemSession, and I do not see many examples that 
> setVersionFilter get used for some reason. 
> Another thing that confuses me is that version range is resolved by 
> DefaultVersionRangeResolver in maven rather than maven-resolver here.
>  
> I wonder if it possible to set HighestVersionFilter 
> [here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
>  instead of return all version range results. I am happy to contribute a PR 
> with some guidance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (MRESOLVER-164) DefaultDependencyCollector filterVersions seems always return full version range

2021-02-18 Thread Xiang Li (Jira)
Xiang Li created MRESOLVER-164:
--

 Summary: DefaultDependencyCollector filterVersions seems always 
return full version range
 Key: MRESOLVER-164
 URL: https://issues.apache.org/jira/browse/MRESOLVER-164
 Project: Maven Resolver
  Issue Type: Bug
Affects Versions: 1.6.1, 1.4.2
Reporter: Xiang Li


Related to MNG-7049 but I think the root cause is in maven-resolver so I opened 
a new issue. Correct me if it is better to still use the old ticket.

During using version ranges, I notice that maven will download all poms from a 
version range, which happen in that 
[loop|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],
 the reason is that 
[verFilter|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
 here seems return null. Since by default, versionFilter is set to null by 
DefaultRepositorySystemSession, and I do not see many examples that 
setVersionFilter get used for some reason. 

Another thing that confuses me is that version range is resolved by 
DefaultVersionRangeResolver in maven rather than maven-resolver here.

 

I wonder if it possible to set HighestVersionFilter 
[here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L155]
 instead of return all version range results.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2021-02-17 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17285640#comment-17285640
 ] 

Xiang Li edited comment on MNG-7049 at 2/17/21, 9:09 PM:
-

After some digging through the code, I found that it process every dependency 
of a certain version 
[[range|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],],]
 I wonder if it is intended while it can directly return the highest version. 
Appreciate any guidance.

If not return whole verion set but the highest version 
[here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L682],
 it seems stop those pom downloads.

 [~michael-o]


was (Author: xiangli1996):
After some digging through the code, I found that it process every dependency 
of a certain version 
[[range|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],],]
 I wonder if it is intended while it can directly return the highest version. 
Appreciate any guidance.

If not return whole verion set 
[here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L682],
 it seems stop those pom downloads.

 [~michael-o]

> Version range resolution downloads all poms, not just the highest version
> -
>
> Key: MNG-7049
> URL: https://issues.apache.org/jira/browse/MNG-7049
> Project: Maven
>  Issue Type: Improvement
>  Components: core
>Reporter: Moti Nisenson-Ken
>Priority: Major
>
> When specifying a version range for a dependency, maven will download and try 
> to resolve all poms in that range which satisfy the range. The usage however 
> is only to use the highestVersion. This causes two issues:
>  # Performance - it's downloading numerous poms that aren't needed.
>  # Fragility - if the version range covers any "bad" poms, then the build 
> will fail. For example, consider that for a specific version, the parent of a 
> pom is not present in the repository. This is enough to fail any build with a 
> version range covering that specific version, as the range resolution stage 
> will not complete. This is particularly harmful when that version would not 
> be selected as the highest, anyway.
> Recommend to have a system property to control the desired behavior - it 
> should be possible to short-circuit loading all the versions and to just to 
> load the highest version.
> For another user report of this see: 
> [https://stackoverflow.com/questions/25047859/restrict-maven-to-not-download-all-poms]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2021-02-16 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17285640#comment-17285640
 ] 

Xiang Li edited comment on MNG-7049 at 2/17/21, 5:53 AM:
-

After some digging through the code, I found that it process every dependency 
of a certain version 
[[range|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],],]
 I wonder if it is intended while it can directly return the highest version. 
Appreciate any guidance.

If not return whole verion set 
[here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L682],
 it seems stop those pom downloads.

 [~michael-o]


was (Author: xiangli1996):
After some digging through the code, I found that it process every dependency 
of a certain version 
[[range|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],],]
 I wonder if it is intended while it can directly return the highest version. 
Appreciate any guidance.

If not return whole verions 
[here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L682],
 it seems reduce those pom downloads.

 [~michael-o]

> Version range resolution downloads all poms, not just the highest version
> -
>
> Key: MNG-7049
> URL: https://issues.apache.org/jira/browse/MNG-7049
> Project: Maven
>  Issue Type: Improvement
>  Components: core
>Reporter: Moti Nisenson-Ken
>Priority: Major
>
> When specifying a version range for a dependency, maven will download and try 
> to resolve all poms in that range which satisfy the range. The usage however 
> is only to use the highestVersion. This causes two issues:
>  # Performance - it's downloading numerous poms that aren't needed.
>  # Fragility - if the version range covers any "bad" poms, then the build 
> will fail. For example, consider that for a specific version, the parent of a 
> pom is not present in the repository. This is enough to fail any build with a 
> version range covering that specific version, as the range resolution stage 
> will not complete. This is particularly harmful when that version would not 
> be selected as the highest, anyway.
> Recommend to have a system property to control the desired behavior - it 
> should be possible to short-circuit loading all the versions and to just to 
> load the highest version.
> For another user report of this see: 
> [https://stackoverflow.com/questions/25047859/restrict-maven-to-not-download-all-poms]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2021-02-16 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17285640#comment-17285640
 ] 

Xiang Li edited comment on MNG-7049 at 2/17/21, 5:50 AM:
-

After some digging through the code, I found that it process every dependency 
of a certain version 
[[range|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],],]
 I wonder if it is intended while it can directly return the highest version. 
Appreciate any guidance.

If not return whole verions 
[here|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L682],
 it seems reduce those pom downloads.

 [~michael-o]


was (Author: xiangli1996):
After some digging through the code, I found that it process every dependency 
of a certain version 
[[range|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],|#L404],]
 I wonder if it is intended while it can directly return the highest version. 
Appreciate any guidance. [~michael-o]

> Version range resolution downloads all poms, not just the highest version
> -
>
> Key: MNG-7049
> URL: https://issues.apache.org/jira/browse/MNG-7049
> Project: Maven
>  Issue Type: Improvement
>  Components: core
>Reporter: Moti Nisenson-Ken
>Priority: Major
>
> When specifying a version range for a dependency, maven will download and try 
> to resolve all poms in that range which satisfy the range. The usage however 
> is only to use the highestVersion. This causes two issues:
>  # Performance - it's downloading numerous poms that aren't needed.
>  # Fragility - if the version range covers any "bad" poms, then the build 
> will fail. For example, consider that for a specific version, the parent of a 
> pom is not present in the repository. This is enough to fail any build with a 
> version range covering that specific version, as the range resolution stage 
> will not complete. This is particularly harmful when that version would not 
> be selected as the highest, anyway.
> Recommend to have a system property to control the desired behavior - it 
> should be possible to short-circuit loading all the versions and to just to 
> load the highest version.
> For another user report of this see: 
> [https://stackoverflow.com/questions/25047859/restrict-maven-to-not-download-all-poms]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2021-02-16 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17285640#comment-17285640
 ] 

Xiang Li edited comment on MNG-7049 at 2/17/21, 5:43 AM:
-

After some digging through the code, I found that it process every dependency 
of a certain version 
[[range|https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],|#L404],]
 I wonder if it is intended while it can directly return the highest version. 
Appreciate any guidance. [~michael-o]


was (Author: xiangli1996):
After some digging through the code, I found that it process every dependency 
of a certain version 
range[[https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],]
 I wonder if it is intended while it can directly return the highest version. 
Appreciate any guidance. [~michael-o]

> Version range resolution downloads all poms, not just the highest version
> -
>
> Key: MNG-7049
> URL: https://issues.apache.org/jira/browse/MNG-7049
> Project: Maven
>  Issue Type: Improvement
>  Components: core
>Reporter: Moti Nisenson-Ken
>Priority: Major
>
> When specifying a version range for a dependency, maven will download and try 
> to resolve all poms in that range which satisfy the range. The usage however 
> is only to use the highestVersion. This causes two issues:
>  # Performance - it's downloading numerous poms that aren't needed.
>  # Fragility - if the version range covers any "bad" poms, then the build 
> will fail. For example, consider that for a specific version, the parent of a 
> pom is not present in the repository. This is enough to fail any build with a 
> version range covering that specific version, as the range resolution stage 
> will not complete. This is particularly harmful when that version would not 
> be selected as the highest, anyway.
> Recommend to have a system property to control the desired behavior - it 
> should be possible to short-circuit loading all the versions and to just to 
> load the highest version.
> For another user report of this see: 
> [https://stackoverflow.com/questions/25047859/restrict-maven-to-not-download-all-poms]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2021-02-16 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17285640#comment-17285640
 ] 

Xiang Li commented on MNG-7049:
---

After some digging through the code, I found that it process every dependency 
of a certain version 
range[[https://github.com/apache/maven-resolver/blob/master/maven-resolver-impl/src/main/java/org/eclipse/aether/internal/impl/collect/DefaultDependencyCollector.java#L404],]
 I wonder if it is intended while it can directly return the highest version. 
Appreciate any guidance. [~michael-o]

> Version range resolution downloads all poms, not just the highest version
> -
>
> Key: MNG-7049
> URL: https://issues.apache.org/jira/browse/MNG-7049
> Project: Maven
>  Issue Type: Improvement
>  Components: core
>Reporter: Moti Nisenson-Ken
>Priority: Major
>
> When specifying a version range for a dependency, maven will download and try 
> to resolve all poms in that range which satisfy the range. The usage however 
> is only to use the highestVersion. This causes two issues:
>  # Performance - it's downloading numerous poms that aren't needed.
>  # Fragility - if the version range covers any "bad" poms, then the build 
> will fail. For example, consider that for a specific version, the parent of a 
> pom is not present in the repository. This is enough to fail any build with a 
> version range covering that specific version, as the range resolution stage 
> will not complete. This is particularly harmful when that version would not 
> be selected as the highest, anyway.
> Recommend to have a system property to control the desired behavior - it 
> should be possible to short-circuit loading all the versions and to just to 
> load the highest version.
> For another user report of this see: 
> [https://stackoverflow.com/questions/25047859/restrict-maven-to-not-download-all-poms]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2021-02-04 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17279326#comment-17279326
 ] 

Xiang Li edited comment on MNG-7049 at 2/5/21, 6:56 AM:


[~michael-o] thanks for the reply, the inefficient does cause lot of trouble 
while you have tons development versions in certain range. Also it can be 
fragile if there are some "bad" poms.
 I looked both 
[DefaultVersionRangeResolver.java|https://github.com/apache/maven/blob/maven-3.6.3/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java]
 and 
[DefaultModelResolver.java|https://github.com/apache/maven/blob/maven-3.6.3/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java]
 (I use maven 3.6.3) but those resolve module seems directly take the highest 
version instead of caching all previous versions' pom. Forgive my ignorance 
maven knowledge, but I wonder if maven will cache all pom files in version 
range that exists in remote metadata.xml?


was (Author: xiangli1996):
[~michael-o] thanks for the reply, the inefficient does cause lot of trouble 
while you have tons development versions in certain range. Also it can be 
fragile if there are some "bad" poms.
 I looked both 
[DefaultVersionRangeResolver.java|https://github.com/apache/maven/blob/maven-3.6.3/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java]
 and 
[DefaultModelResolver.java|https://github.com/apache/maven/blob/maven-3.6.3/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java]
 (I use maven 3.6.3) but those resolve module seems directly take the highest 
version instead of caching all previous versions' pom. Sorry if I am not 
familiar with maven code, but I wonder if maven will cache all pom files that 
exists metadata.xml if it is not the versionRangeResolver's issue?

> Version range resolution downloads all poms, not just the highest version
> -
>
> Key: MNG-7049
> URL: https://issues.apache.org/jira/browse/MNG-7049
> Project: Maven
>  Issue Type: Improvement
>  Components: core
>Reporter: Moti Nisenson-Ken
>Priority: Major
>
> When specifying a version range for a dependency, maven will download and try 
> to resolve all poms in that range which satisfy the range. The usage however 
> is only to use the highestVersion. This causes two issues:
>  # Performance - it's downloading numerous poms that aren't needed.
>  # Fragility - if the version range covers any "bad" poms, then the build 
> will fail. For example, consider that for a specific version, the parent of a 
> pom is not present in the repository. This is enough to fail any build with a 
> version range covering that specific version, as the range resolution stage 
> will not complete. This is particularly harmful when that version would not 
> be selected as the highest, anyway.
> Recommend to have a system property to control the desired behavior - it 
> should be possible to short-circuit loading all the versions and to just to 
> load the highest version.
> For another user report of this see: 
> [https://stackoverflow.com/questions/25047859/restrict-maven-to-not-download-all-poms]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2021-02-04 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17279326#comment-17279326
 ] 

Xiang Li commented on MNG-7049:
---

[~michael-o] thanks for the reply, the inefficient does cause lot of trouble 
while you have tons development versions in certain range. Also it can be 
fragile if there are some "bad" poms.
 I looked both 
[DefaultVersionRangeResolver.java|https://github.com/apache/maven/blob/maven-3.6.3/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultVersionRangeResolver.java]
 and 
[DefaultModelResolver.java|https://github.com/apache/maven/blob/maven-3.6.3/maven-resolver-provider/src/main/java/org/apache/maven/repository/internal/DefaultModelResolver.java]
 (I use maven 3.6.3) but those resolve module seems directly take the highest 
version instead of caching all previous versions' pom. Sorry if I am not 
familiar with maven code, but I wonder if maven will cache all pom files that 
exists metadata.xml if it is not the versionRangeResolver's issue?

> Version range resolution downloads all poms, not just the highest version
> -
>
> Key: MNG-7049
> URL: https://issues.apache.org/jira/browse/MNG-7049
> Project: Maven
>  Issue Type: Improvement
>  Components: core
>Reporter: Moti Nisenson-Ken
>Priority: Major
>
> When specifying a version range for a dependency, maven will download and try 
> to resolve all poms in that range which satisfy the range. The usage however 
> is only to use the highestVersion. This causes two issues:
>  # Performance - it's downloading numerous poms that aren't needed.
>  # Fragility - if the version range covers any "bad" poms, then the build 
> will fail. For example, consider that for a specific version, the parent of a 
> pom is not present in the repository. This is enough to fail any build with a 
> version range covering that specific version, as the range resolution stage 
> will not complete. This is particularly harmful when that version would not 
> be selected as the highest, anyway.
> Recommend to have a system property to control the desired behavior - it 
> should be possible to short-circuit loading all the versions and to just to 
> load the highest version.
> For another user report of this see: 
> [https://stackoverflow.com/questions/25047859/restrict-maven-to-not-download-all-poms]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2021-02-03 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-7049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17278423#comment-17278423
 ] 

Xiang Li commented on MNG-7049:
---

I hit the same issue, I wonder if it is necessary for 
DefaultVersionRangeResolver to download all previous poms instead of directly 
getting the highest version from metadata, seem maven version plugin did able 
to fetch metadata only. 

> Version range resolution downloads all poms, not just the highest version
> -
>
> Key: MNG-7049
> URL: https://issues.apache.org/jira/browse/MNG-7049
> Project: Maven
>  Issue Type: Bug
>  Components: core
>Reporter: Moti Nisenson-Ken
>Priority: Major
>
> When specifying a version range for a dependency, maven will download and try 
> to resolve all poms in that range which satisfy the range. The usage however 
> is only to use the highestVersion. This causes two issues:
>  # Performance - it's downloading numerous poms that aren't needed.
>  # Fragility - if the version range covers any "bad" poms, then the build 
> will fail. For example, consider that for a specific version, the parent of a 
> pom is not present in the repository. This is enough to fail any build with a 
> version range covering that specific version, as the range resolution stage 
> will not complete. This is particularly harmful when that version would not 
> be selected as the highest, anyway.
> Recommend to have a system property to control the desired behavior - it 
> should be possible to short-circuit loading all the versions and to just to 
> load the highest version.
> For another user report of this see: 
> [https://stackoverflow.com/questions/25047859/restrict-maven-to-not-download-all-poms]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (MNG-6049) Add behavior to filter resolved version ranges of an artifact

2020-05-18 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-6049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17110645#comment-17110645
 ] 

Xiang Li edited comment on MNG-6049 at 5/19/20, 1:34 AM:
-

Hi, since aether got merged after maven 3.5, I can not find the same method 
anymore, wonder if the interface got removed or still presist in another name?


was (Author: xiang li):
Hi, I wonder if it is still on the road map?

> Add behavior to filter resolved version ranges of an artifact
> -
>
> Key: MNG-6049
> URL: https://issues.apache.org/jira/browse/MNG-6049
> Project: Maven
>  Issue Type: Improvement
>  Components: core, Dependencies
>Reporter: Uwe Barthel
>Priority: Critical
> Fix For: 3.7.x-candidate
>
>
> The discussion on issue MNG-3092 shows the seriously needs of different kinds 
> of version range resolving in Maven.
> This solution provides a hook for Maven extensions/plugins to change the list 
> of resolved version range results as required.
> The {{DefaultVersionRangeResolver}} will be extended with a filter for 
> version range results. A new interface {{VersionRangeResultFilter}} is added 
> and a non-filtering {{DefaultVersionRangeResultFilter}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MNG-6049) Add behavior to filter resolved version ranges of an artifact

2020-05-18 Thread Xiang Li (Jira)


[ 
https://issues.apache.org/jira/browse/MNG-6049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17110645#comment-17110645
 ] 

Xiang Li commented on MNG-6049:
---

Hi, I wonder if it is still on the road map?

> Add behavior to filter resolved version ranges of an artifact
> -
>
> Key: MNG-6049
> URL: https://issues.apache.org/jira/browse/MNG-6049
> Project: Maven
>  Issue Type: Improvement
>  Components: core, Dependencies
>Reporter: Uwe Barthel
>Priority: Critical
> Fix For: 3.7.x-candidate
>
>
> The discussion on issue MNG-3092 shows the seriously needs of different kinds 
> of version range resolving in Maven.
> This solution provides a hook for Maven extensions/plugins to change the list 
> of resolved version range results as required.
> The {{DefaultVersionRangeResolver}} will be extended with a filter for 
> version range results. A new interface {{VersionRangeResultFilter}} is added 
> and a non-filtering {{DefaultVersionRangeResultFilter}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)