MinecraftForge / ForgeGradle

Minecraft mod development framework used by Forge and FML for the gradle build system
GNU Lesser General Public License v2.1
509 stars 437 forks source link

Task genIntellijRuns -> runtimeClasspathCopy is failing #946

Open Stein-N opened 1 month ago

Stein-N commented 1 month ago

I am getting the following error:

Execution failed for task ':genIntellijRuns'.
> Could not resolve all files for configuration ':runtimeClasspathCopy'.
   > Could not resolve net.sf.jopt-simple:jopt-simple:5.0.4.
     Required by:
         project :
         project : > net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21 > net.minecraft:client:1.21
         project : > net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21 > net.minecraftforge:fmlloader:1.21-51.0.26
         project : > net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21 > net.minecraftforge:fmlearlydisplay:1.21-51.0.26
      > Cannot find a version of 'net.sf.jopt-simple:jopt-simple' that satisfies the version constraints:
           Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.sf.jopt-simple:jopt-simple:5.0.4'
           Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'com.example.examplemod:example-mod-forge:1.0.0' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:{strictly 5.0.4}'
           Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraft:client:1.21' (runtime) --> 'net.sf.jopt-simple:jopt-simple:5.0.4'
           Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraftforge:accesstransformers:8.2.0' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3'
           Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraftforge:modlauncher:10.2.1' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:6.0-alpha-3'
           Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraftforge:fmlloader:1.21-51.0.26' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:5.0.4'
           Dependency path 'com.example.examplemod:Forge Example mod:1.0.0' --> 'net.minecraftforge:forge:1.21-51.0.26_mapped_official_1.21' (runtime) --> 'net.minecraftforge:fmlearlydisplay:1.21-51.0.26' (runtimeElements) --> 'net.sf.jopt-simple:jopt-simple:5.0.4'

* 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.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 818ms
8 actionable tasks: 3 executed, 5 up-to-date

The first apperance was on an multiloader setup, but i tested it with an mod that was build with the mdk and was implemented in an mdk setup. Everytime i get this error. I also switched the gradle versions from 8.7 up to 8.9, rebuild the complete project.

The only solution i got is to disable/remove the implementation of jopt-simple before building/publish the jar file, then the error isn't triggered/appearing

Edit 1:

Also wiped the complete .gradle folder on C:/User// but not even then it worked.