maven icon indicating copy to clipboard operation
maven copied to clipboard

Maven 4.0.0-rc-3 fails with HTTP 500 when downloading from JitPack (but Maven 3.9.10 is fine, and it's fully reproducible, and not a transient server error)

Open vorburger opened this issue 8 months ago • 4 comments

Affected version

4.0.0 RC3

Bug description

From https://issues.apache.org/jira/browse/MSHARED-1476 :

@cstamas this is to follow-up re. our discussion about this over here; so here is the reproducer:

$ git clone https://github.com/enola-dev/LearningADK.git
$ cd LangChain4j
$ git checkout 077dfc6
$ ../mvnw clean compile

This works great, as it should! But the following fails, and it's fully reproducible, and not a transient server error, and the only difference is https://github.com/enola-dev/LearningADK/commit/077dfc6a83ea04841c37d566339c69f5cb2bfa61 :

$ git checkout 0578de9
$ rm -rf ~/.m2/repository/com/github/enola-dev
$ ../mvnw clean compile

[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------------------------{}< dev.enola.adk:langchain4j >{}---------------------------------------------
[INFO] Building langchain4j 0.0.1-SNAPSHOT
[INFO] from pom.xml
[INFO] -------------------------------------------------------{}[ jar ]{}--------------------------------------------------------
[WARNING] Version not locked for default bindings plugins [maven-clean-plugin, maven-resources-plugin, maven-compiler-plugin], you should define versions in pluginManagement section of your pom.xml or parent
Downloading from jitpack.io: https://jitpack.io/com/github/enola-dev/adk-java/google-adk-langchain4j/LangChain4j-preview-41254a8f39-1/google-adk-langchain4j-LangChain4j-preview-41254a8f39-1.pom
Downloading from central: https://repo.maven.apache.org/maven2/com/github/enola-dev/adk-java/google-adk-langchain4j/LangChain4j-preview-41254a8f39-1/google-adk-langchain4j-LangChain4j-preview-41254a8f39-1.pom
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------------------------------------------------------------
[INFO] Total time: 0.885 s
[INFO] Finished at: 2025-06-08T10:40:05+02:00
[INFO] --------------------------------------------------------------------------------------------------------------------------
[ERROR] Failed to execute goal on project langchain4j: Could not collect dependencies for project dev.enola.adk:langchain4j:jar:0.0.1-SNAPSHOT
[ERROR] Failed to read artifact descriptor for com.github.enola-dev.adk-java:google-adk-langchain4j:jar:LangChain4j-preview-41254a8f39-1
[ERROR] Caused by: The following artifacts could not be resolved: com.github.enola-dev.adk-java:google-adk-langchain4j:pom:LangChain4j-preview-41254a8f39-1 (absent): Could not transfer artifact com.github.enola-dev.adk-java:google-adk-langchain4j:pom:LangChain4j-preview-41254a8f39-1 from/to jitpack.io ([https://jitpack.io):](https://jitpack.io)/) HTTP Status: 500
[ERROR] : Failed to collect dependencies at com.github.enola-dev.adk-java:google-adk-langchain4j:jar:LangChain4j-preview-41254a8f39-1
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the '-e' switch
[ERROR] Re-run Maven using the '-X' switch to enable verbose output
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

I'm assuming that you'll agree that this doesn't seem right, and should be considered a fairly high priority (blocking?) issue? I haven't debugged it, but if I had to venture any guess, it would be that Maven 4.0.0 RC3 may be sending along some (new or different) HTTP header causing JitPack to fall flat on its face and trigger that 500 on their end?

@glaforge FYI

vorburger avatar Jun 08 '25 10:06 vorburger

Thanks for reporting this! I confirm and reproduced it. Created https://github.com/apache/maven-resolver/issues/739

You can circumvent it by using -Dmaven.resolver.transport=apache that will make Maven 4 use apache transport (used as default in Maven 3.9.x), instead of new JDK transport (introduced in Maven 4.0.x).

cstamas avatar Jun 08 '25 13:06 cstamas

@cstamas do we (you) want to close this issue now, seeing how https://github.com/apache/maven-resolver/issues/739 is resolved?

vorburger avatar Jul 21 '25 20:07 vorburger

@slawekjaranowski i think yes but am on vacation

cstamas avatar Jul 21 '25 20:07 cstamas

we have updated resolver to 2.0.10

  • #2541 - 4.0.x
  • #2544 - 4.1.x - mster

but Maven 4.x not released yet

slawekjaranowski avatar Jul 21 '25 20:07 slawekjaranowski