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

Remove mavenLocal from default repositories #161

Closed
sghill opened this issue Apr 30, 2020 · 0 comments
Closed

Remove mavenLocal from default repositories #161

sghill opened this issue Apr 30, 2020 · 0 comments
Milestone

Comments

@sghill
Copy link

sghill commented Apr 30, 2020

In order to better support reproducible builds
As a user
I want mavenLocal() to not be added by default

User Changes Required

Users who depend on mavenLocal() will need to add this declaration:

repositories {
    mavenLocal()
}

Context

The Gradle docs cover several reasons why mavenLocal() shouldn't be added and include the recommendation:

As a general advice, you should avoid adding mavenLocal() as a repository.

If jenkinsPlugin.configureRepositories = true (default), mavenLocal() is the first repository added. After building Jenkins from source, I started to get this failure:

* What went wrong:
    Execution failed for task ':runtime'.
    > Could not resolve all files for configuration ':runtimeClasspath'.
       > Could not find workflow-step-api-2.20.jar (org.jenkins-ci.plugins.workflow:workflow-step-api:2.20).
         Searched in the following locations:
                 file:~/.m2/repository/org/jenkins-ci/plugins/workflow/workflow-step-api/2.20/workflow-step-api-2.20.jar

This fails to search other repositories because order matters:

Once a repository returns a metadata result, following repositories are ignored.

@sghill sghill added this to the 0.40.0 milestone May 1, 2020
@sghill sghill closed this as completed in 27123f5 May 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant