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

Java (Gradle) ignoring maven central #3901

Open
MarcelCoding opened this issue Jun 14, 2021 · 3 comments
Open

Java (Gradle) ignoring maven central #3901

MarcelCoding opened this issue Jun 14, 2021 · 3 comments
Labels
L: java:gradle Maven packages via Gradle T: bug 🐞 Something isn't working Workaround 🔁 Workaround for an upstream bug or unsupported feature

Comments

@MarcelCoding
Copy link

Package ecosystem
java
Package manager version
gradle 7.0.2
Language version
java 11 & 16
Manifest location and content prior to update

dependabot.yml content
https://github.com/MarcelCoding/luna/blob/main/.github/dependabot.yaml
Updated dependency
org.springdoc:springdoc-openapi-webflux-ui 1.5.6
What you expected to see, versus what you actually saw
As you see maven central is not checked:

updater | INFO <job_161072655> Checking if org.springdoc:springdoc-openapi-webflux-ui 1.5.6 needs updating
  proxy | 2021/06/14 07:35:00 [048] GET https://raw.githubusercontent.com:443/getnova/maven/main/org/springdoc/springdoc-openapi-webflux-ui/maven-metadata.xml
  proxy | 2021/06/14 07:35:00 [048] 404 https://raw.githubusercontent.com:443/getnova/maven/main/org/springdoc/springdoc-openapi-webflux-ui/maven-metadata.xml
  proxy | 2021/06/14 07:35:00 [050] GET https://repo.spring.io:443/release/org/springdoc/springdoc-openapi-webflux-ui/maven-metadata.xml
  proxy | 2021/06/14 07:35:00 [050] 404 https://repo.spring.io:443/release/org/springdoc/springdoc-openapi-webflux-ui/maven-metadata.xml
  proxy | 2021/06/14 07:35:00 [052] GET https://repo.spring.io:443/milestone/org/springdoc/springdoc-openapi-webflux-ui/maven-metadata.xml
  proxy | 2021/06/14 07:35:00 [052] 404 https://repo.spring.io:443/milestone/org/springdoc/springdoc-openapi-webflux-ui/maven-metadata.xml
  proxy | 2021/06/14 07:35:00 [054] GET https://repo.spring.io:443/snapshot/org/springdoc/springdoc-openapi-webflux-ui/maven-metadata.xml
  proxy | 2021/06/14 07:35:00 [054] 404 https://repo.spring.io:443/snapshot/org/springdoc/springdoc-openapi-webflux-ui/maven-metadata.xml
updater | INFO <job_161072655> Latest version is 
updater | INFO <job_161072655> Requirements to unlock update_not_possible
updater | INFO <job_161072655> Requirements update strategy 
updater | INFO <job_161072655> No update possible for org.springdoc:springdoc-openapi-webflux-ui 1.5.6

But Maven Central is configured: https://github.com/MarcelCoding/luna/blob/main/build.gradle#L35-L51
Native package manager behavior
Gradle is capable to locate packages in maven central.
Images of the diff or a link to the PR, issue or logs
Logs

🕹 Bonus points: Smallest manifest that reproduces the issue

@MarcelCoding MarcelCoding added the T: bug 🐞 Something isn't working label Jun 14, 2021
@asciimike asciimike added the L: java:gradle Maven packages via Gradle label Jun 16, 2021
@bmarty
Copy link

bmarty commented May 6, 2022

Our project is suffering from the same issue I think: element-hq/element-android#5961.

@MarcelCoding did you find a way to workaround the problem?

@MarcelCoding
Copy link
Author

MarcelCoding commented May 6, 2022

Unfortunately not, I could try not using mavenCentral() but like the actual URL maven { url 'https://repo1.maven.org/maven2/' }. Idk why I didn't try that yet...

... it actually worked. I am so stupid.

@bmarty

@jeffwidman
Copy link
Member

Ideally we'd parse this out as a special case and translate it to the known maven central URL, but I looked at the commit where you fixed this (MarcelCoding/luna@7e2053b) and it looks like mavenCentral() allows specifying URL excludes, so it gets tricky fast:
MarcelCoding/luna@7e2053b#diff-49a96e7eea8a94af862798a45174e6ac43eb4f8b4bd40759b5da63ba31ec3ef7L39-L41

Our current parser for Maven is completely ruby based, and a bit primitive... long term we'd like to move to a native Java-based helper which would allow directly processing code when fetching the packages, but we're unlikely to get to that for a while.

Thankfully the workaround is trivial.

@jeffwidman jeffwidman added the Workaround 🔁 Workaround for an upstream bug or unsupported feature label Feb 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
L: java:gradle Maven packages via Gradle T: bug 🐞 Something isn't working Workaround 🔁 Workaround for an upstream bug or unsupported feature
Projects
None yet
Development

No branches or pull requests

4 participants