question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incomplete pom content sent on Gradle

See original GitHub issue

I got an error when I tried to build my own project using gradle:

* What went wrong:
Execution failed for task ':api-bukkit:compileJava'.
> Could not resolve all files for configuration ':api-bukkit:compileClasspath'.
   > Could not resolve com.comphenix.protocol:ProtocolLib:4.7.0.
     Required by:
         project :api-bukkit
      > Could not resolve com.comphenix.protocol:ProtocolLib:4.7.0.
         > Could not parse POM https://maven.airgame.net/hamster-repo/com/comphenix/protocol/ProtocolLib/4.7.0/ProtocolLib-4.7.0.pom
            > XML 文档结构必须从头至尾包含在同一个实体内。

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

and i run with --stacktrace

Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.comphenix.protocol:ProtocolLib:4.7.0.
Caused by: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.parser.MetaDataParseException: Could not parse POM https://maven.airgame.net/hamster-repo/com/comphenix/protocol/ProtocolLib/4.7.0/ProtocolLib-4.7.0.pom
Caused by: org.xml.sax.SAXParseException; systemId: file:/C:/Users/MiniDay/.gradle/caches/modules-2/files-2.1/com.comphenix.protocol/ProtocolLib/4.7.0/895e366c727d74d720b981cdd3d2e66ca5fa0f6e/ProtocolLib-4.7.0.pom; lineNumber: 79; columnNumber: 4; XML 文档结构必须从头至尾包含在同一个实体内。

The error message told me: The structure of the XML document must be contained in the same entity from beginning to end.

So I opened my file browser and found that file to view it. It was found to be wrong: the entire file was intercepted directly after line 78.

Then I went back to my server to check this file, I found that the file on the server is complete, it has a size of 10kb, but I downloaded to the local through gradle only 3kb.

I thought there was something wrong with the server, so I deleted the file on the server and the local file, and then rebuilt the project so that it would download the file again.

However, even if I did this, the same problem still occurred.

So I tried to manually copy the file on the server directly and overwrite the local file. Rebuild the project again, the result was successful.

Okay, so I now infer that some accident happened when reposilite was transferring this file, which caused it to break the http link at the incorrect time? Or what kind of content does reposilite think it should only send? In any case, I think this problem should be caused by the incomplete content that my gradle received from reposilite.

Finally, the version I used: Gradle: 7.0.2 reposilite: 2.9.23

reposilite mirrors of:

  https://repo.dmulloy2.net/repository/releases
  https://repo.dmulloy2.net/repository/snapshots

gradle dependencies:

compileOnly 'com.comphenix.protocol:ProtocolLib:4.7.0'

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
dzikoyskcommented, Aug 12, 2021

Thanks for feedback! 😃

1reaction
MiniDaycommented, Aug 12, 2021

okay, thanks! It works

Read more comments on GitHub >

github_iconTop Results From Across the Web

java - Bintray Gradle Plugin - POM is incomplete, won't sync to ...
I was able to upload to Bintray, but the sync to Maven Central keeps failing because it complains about the POM missing stuff....
Read more >
Declaring repositories - Gradle User Manual
Contents. Declaring a publicly-available repository; Declaring a custom repository by URL ... Maven POM metadata can reference additional repositories.
Read more >
Learning the Basics - Gradle User Manual
Maven POM metadata can reference additional repositories. These will be ignored by Gradle, which will only use the repositories declared in the build...
Read more >
userguide.pdf - Gradle User Manual
is incompatible or incomplete when compared to the official version (available from ... Separation of compile and runtime dependencies when consuming POMs.
Read more >
Gradle Enterprise Maven Extension User Manual
The extension is configured through one or more gradle-enterprise.xml files and the pluginManagement sections of your pom.xml files.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found