-
Notifications
You must be signed in to change notification settings - Fork 461
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
Implement a global non-maven download policy #1669
Comments
Maybe a list of hosts would be a better fit. I feel premature to consider mirroring capabilities, but I would add it in the radar.
This is also a relevant information for people integrating Spotless in a SaaS deployment :). (For Cleanthat, how can I customize this path?) |
This is different formatter-to-formatter. For example, the Equo formatters download locations are based on this (customization info), and you can change mirroring like this. I agree that just an allowed-host list would work great for Eclipse. But for the Rome formatter, it downloads to Equo is the latest change from non-downloading to downloading, but it's not the only place in the codebase where we break out of the expected maven-only behavior. |
We agree Equo is just the latest example of I was about to argue than individual users or corporate users would be interested in URL-prefix whitelists or host-only whitelists. Writing about it, I rather feel:
For my personal case (an individual and a corporate users), I'm still not fully convinced I care much about URL-prefix as:
I would suggest switching this to |
Here is a similar request but gradle-related: #1524 (comment) |
Did I understand you right that you just hardcode "https://download.eclipse.org/' as the only one repo from you can fetch eclipse(versions 2.4+)? If the answer is "yes", I believe you should fix that, because any other repositories(mirrors) that we will pass to maven to fetch eclipse will be ignored. |
We initially added download.eclipse.org to
Then to find the actual issue we added We got the groovy url from So we added both |
Many firms do not allow repositories to be accessed by mirrors at all. Instead we have a single corporate mirror that presents a security scanned cache of several external sites. This is preconfigured and we do not want any plugins to attempt to modify the repository list. Ideally there would be a well documented configuration option to disable adding repos. Also be good to be clear which tasks might be affected by selecting that |
There might be some configuration cache issue at play here. With latest gradle I see it trying to serialize the state of tasks which trigger an eclipse download attempt for spotlessGroovy task. This is unfortunate since we don't want nor use this task and so had not previously attempted to configure p2mirrors |
Problem is due to EquoStepBuilders state() method calling jarPromise.get() |
The Spotless core has few dependencies. During plugin configuration, we add maven dependencies which get downloaded in the normal way.
There are some exceptions where we use non-maven formatters. For example
There are other cases we are considering, such as
A very good thing about Spotless is that it "just works". Search the docs for the kind of formatter you want, specify that formatter, and you're ready to go. But for these non-maven-based formatters, I think it's fair for users to be surprised that their build plugin is making network requests and caching artifacts outside of the expected maven channel.
I'm proposing something like this:
As a user, it would work like this:
It's not a perfect mechanism, it relies on our own diligence in making sure that PR's such as the Rome PR follow the rules about checking the allowed URLs. But it takes away the surprise, which is important. Users might choose a different formatter based on whether it is available through a standard maven proxy or not.
The text was updated successfully, but these errors were encountered: