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

Use built-in Gradle shorthand notation for Maven Central repository #581

Merged
merged 1 commit into from Jan 11, 2021

Conversation

valfirst
Copy link
Contributor

No description provided.

@stleary
Copy link
Owner

stleary commented Dec 30, 2020

@valfirst Thanks for submitting this PR. What is the purpose of this change? Does it solve a problem?

@valfirst
Copy link
Contributor Author

@stleary

  • http://repo.maven.apache.org/maven2 - HTTP is not allowed anymore, HTTPS is required:
501 HTTPS Required. 
Use https://repo.maven.apache.org/maven2/
More information at https://links.sonatype.com/central/501-https-required
  • instead of managing URLs on the project side Gradle can do it, so in case of some changes it won't be needed to update URLs

@valfirst
Copy link
Contributor Author

More details can be found here: https://docs.gradle.org/current/userguide/declaring_repositories.html

@valfirst
Copy link
Contributor Author

Complete error:

> Task :compileTestJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileTestJava'.
> Could not resolve all files for configuration ':testCompileClasspath'.
   > Could not resolve com.jayway.jsonpath:json-path:2.1.0.
     Required by:
         project :
      > Could not resolve com.jayway.jsonpath:json-path:2.1.0.
         > Could not get resource 'http://repo.maven.apache.org/maven2/com/jayway/jsonpath/json-path/2.1.0/json-path-2.1.0.pom'.
            > Could not GET 'http://repo.maven.apache.org/maven2/com/jayway/jsonpath/json-path/2.1.0/json-path-2.1.0.pom'. Received status code 501 from server: HTTPS Required
   > Could not resolve org.mockito:mockito-core:1.9.5.
     Required by:
         project :
      > Could not resolve org.mockito:mockito-core:1.9.5.
         > Could not get resource 'http://repo.maven.apache.org/maven2/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.pom'.
            > Could not GET 'http://repo.maven.apache.org/maven2/org/mockito/mockito-core/1.9.5/mockito-core-1.9.5.pom'. Received status code 501 from server: HTTPS Required

@stleary
Copy link
Owner

stleary commented Dec 31, 2020

No objection to the change, but I cannot recreate the error. Can you provide recreate steps please?

@valfirst
Copy link
Contributor Author

valfirst commented Jan 4, 2021

@stleary most likely you have the dependencies cached in your maven local repo or Gradle cache or even both, so you need

  • to clear local caches
    or
  • to change the caches location (temporarily)
    or
  • use clean machine (container)
    to reproduce the error just by running ./gradlew build

@stleary
Copy link
Owner

stleary commented Jan 5, 2021

It seems reasonable to make this change.

@stleary
Copy link
Owner

stleary commented Jan 6, 2021

What problem does this code solve?
Gradle builds may fail on Maven download. This may occur if the device has never downloaded the Maven files previously.

Risks
Low

Changes to the API?
No

Will this require a new release?
No

Should the documentation be updated?
No

Does it break the unit tests?
No

Was any code refactored in this commit?
No

Review status
APPROVED
Starting 3 day comment window.

@stleary stleary merged commit e33f463 into stleary:master Jan 11, 2021
@valfirst valfirst deleted the patch-1 branch January 11, 2021 06:08
This was referenced Mar 14, 2021
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

Successfully merging this pull request may close these issues.

None yet

2 participants