Incomplete pom content sent on Gradle
See original GitHub issueI 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:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Thanks for feedback! 😃
okay, thanks! It works