Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The jf mvn wrapper should optimize pom version range downloads #2507

Open
bedge opened this issue Mar 31, 2024 · 0 comments
Open

The jf mvn wrapper should optimize pom version range downloads #2507

bedge opened this issue Mar 31, 2024 · 0 comments
Labels
feature request New feature or request

Comments

@bedge
Copy link

bedge commented Mar 31, 2024

When a version range is specified in a pom.xml file, eg: [2.5.0-1,2.5.0-9999)
And there are possibly 10000 poms that could match this, every one is downloaded, eg:

image

This can take up a huge amount of time.

Given that the jf wrapper has access to the pom.xml files, as well as the ability to

  • query for the latest matching artifact versions, and
  • deduce the latest version that matches the maven range,
    it could replace the range with the specific version, thereby eliminating the need to pull potentially 1000's of pom files that will neved be used.

In short,

  • any maven version ranges,
  • where the artifact is being pulled from a jFrog repo,
  • query the repo for the latest version,
  • and replace the version range string with the latest version number.

eg: Assuming a jf rf search for the artifact com.xxx.yyy.aaa, using --sort-by=created --sort-order=desc --limit=1
returns version 2.5.0-1234

replace:

        <dependency>
            <groupId>com.xxx.yyy</groupId>
            <artifactId>aaa</artifactId>
            <version>[2.5.0-1,2.5.0-9999)</version>
        </dependency>

with:

        <dependency>
            <groupId>com.xxx.yyy</groupId>
            <artifactId>aaa</artifactId>
            <version>2.5.0-1234</version>
        </dependency>

Which eliminates the need to download the pom.xml files for 2.5.0-1 - 2.5.0-1233

@bedge bedge added the feature request New feature or request label Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant