Gradle classpath task failed for fabric example project
PevMont opened this issue · comments
https://github.com/FabricMC/fabric-example-mod
The project above is used by many with other IDE's that import the gradle files correctly.
Actual behavior (Required!)
Error is given, plugin fails to load, no java completion. Vim acts as usual.
Expected behavior (Required!)
Plugin loads successfully with java completion with classes from fabric/minecraft.
The steps to reproduce actual behavior (Required!)
git clone https://github.com/FabricMC/fabric-example-mod.git
vim src/main/java/net/fabricmc/example/ExampleMod.java
- Wait 1-3 seconds. Error given in
:message
Environment (Required!)
- OS: Manjaro
- Vim version: 8.2
Q&A
- Yes, I tried minimal .vimrc configuraion.
- Yes, I have enabled logs with
JCdebugEnableLogs
and can put here content ofJCdebugGetLogContent
command, if you need. - Even, if you wish, I can set
g:JavaComplete_JavaviLogLevel
to'debug'
, then setg:JavaComplete_JavaviLogDirectory
, and put here server logs, too.
The output of :redir and :message (Optional)
:message output
Error detected while processing function <SNR>34_JobVimOnErrorHandler[3]..javacomplete#classpath#gradle#BuildClasspathHandler:
line 50:
FAILURE: Build failed with an exception.
* Where:
Script '/home/username/.vim/bundle/vim-javacomplete2/classpath.gradle' line: 39
* What went wrong:
Execution failed for task ':classpath'.
> Could not resolve all files for configuration ':minecraft'.
> Could not find com.mojang:minecraft:1.16.1.
Searched in the following locations:
- https://libraries.minecraft.net/com/mojang/minecraft/1.16.1/minecraft-1.16.1.pom
- file:/home/username/documents/software/minecraft-modding/fabric-example-mod/build/loom-cache/minecraft-1.16.1.jar
- file:/home/username/documents/software/minecraft-modding/fabric-example-mod/build/loom-cache/minecraft.jar
- file:/home/username/documents/software/minecraft-modding/fabric-example-mod/.gradle/loom-cache/remapped_mods/minecraft-1.16.1.jar
- file:/home/username/documents/software/minecraft-modding/fabric-example-mod/.gradle/loom-cache/remapped_mods/minecraft.jar
- https://maven.fabricmc.net/com/mojang/minecraft/1.16.1/minecraft-1.16.1.pom
['1 actionable task: 1 executed']
- https://repo.maven.apache.org/maven2/com/mojang/minecraft/1.16.1/minecraft-1.16.1.pom
- https://jcenter.bintray.com/com/mojang/minecraft/1.16.1/minecraft-1.16.1.pom
- file:/home/username/.gradle/caches/fabric-loom/1.16.1-mapped-net.fabricmc.yarn-1.16.1+build.1-v2/minecraft-1.16.1.jar
- file:/home/username/.gradle/caches/fabric-loom/1.16.1-mapped-net.fabricmc.yarn-1.16.1+build.1-v2/minecraft.jar
Required by:
project :
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
Hi. Hm. But this file: https://libraries.minecraft.net/com/mojang/minecraft/1.16.1/minecraft-1.16.1.pom
really doesn't exists, may be this is the cause of problem?
I have found that /home/username/.gradle/caches/fabric-loom/1.16.1-mapped-net.fabricmc.yarn-1.16.1+build.1-v2/minecraft-1.16.1.jar
is actually minecraft-1.16.1-mapped-net.fabricmc.yarn-1.16.1+build.1-v2.jar
. For some reason, gradle is not looking for the right jar. Once I create a soft link to the correct jar, everything works perfectly.
This workaround works for me, but I will contact the Fabric people to see if they know why it is doing this.