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

2022-04-10 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MNG-7049:
-

[~jhughes], since you want to verify that all versions have been downloaded to 
satisfy your request, I guess your IT needs to contain a file-based repository, 
the project itself and the verification code traverses the IT local repo for 
all POM from the metadata. WDYT?

> 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.20.1#820001)


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

2022-02-24 Thread Jim Hughes (Jira)


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

Jim Hughes commented on MNG-7049:
-

[~michael-o] others, I looked at this briefly and tried to write an integration 
test.  It seems like most IT check only the output of Maven rather than 
checking on internal work that is done.

Is there something I'm missing that would help write an IT for this behavior?  
Otherwise, it may need to be checked in a unit test.

> 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.20.1#820001)


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

2021-12-29 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MNG-7049:
-

[~ibabiankou], this might be of interest as well.

> 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.20.1#820001)


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

2021-09-04 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MNG-7049:
-

Yes, that is the one. Thank you. An IT in Maven would be awesome to depict the 
inefficient behavior.

> 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-08-31 Thread Tuomas Kiviaho (Jira)


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

Tuomas Kiviaho commented on MNG-7049:
-

{quote}I am so certain that I have seen a similiar request for this, but I 
can't remember whether it was with Maven Core or Maven Resolver. Will keep 
looking{quote}

[~michael-o] Here's a link to  
[MRESOLVER-133|https://issues.apache.org/jira/browse/MRESOLVER-133] that you 
probably were looking for. A CI worker without pre-populated local repository 
would indeed benefit from this. 

> 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-19 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MNG-7049:
-

[~xiangli1996], you should write an integration test which depicts this 
inefficiency. As it seems the issue is rooted in Maven, no?

> 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] [Commented] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2021-02-07 Thread Moti Nisenson-Ken (Jira)


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

Moti Nisenson-Ken commented on MNG-7049:


[~elismaga] - not really - we worked around by explicitly managing the lower 
bound of the range so that the range wouldn't contain any bad poms. This 
doesn't help with the fact that it still downloads and resolves all the poms, 
and it also meant needing to maintain something additional.

> 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-05 Thread Eli Smaga (Jira)


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

Eli Smaga commented on MNG-7049:


[~michael-o] Can you point me to where in the Maven code base the downloading 
of all the pom files is being done, and also what action in the 
DefaultVersionRangeResolver is triggering that to happen? Sorry, but I am 
having hard time figuring that out. Is there a functional reason that Maven 
downloads all of those pom files? I'm asking because I am curious if we disable 
that whether it would cause any downstream issues? Do you know of a way to 
disable that from happening with out having to build a custom version of Maven 
or some other work around?

[~mnk] Did you find a solution or a way to work around this?

 

> 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-04 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MNG-7049:
-

[~xiangli1996], likely not, but nothing is wrong here. It is just inefficient.

> 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] [Commented] (MNG-7049) Version range resolution downloads all poms, not just the highest version

2020-12-08 Thread Michael Osipov (Jira)


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

Michael Osipov commented on MNG-7049:
-

I am so certain that I have seen a similiar request for this, but I can't 
remember whether it was with Maven Core or Maven Resolver. Will keep looking.

> 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)