Failed to build with Java OpenJDK 1.8.0_332: Could not resolve net.minecraftforge.gradle:ForgeGradle
recolic opened this issue · 6 comments
Hi I'm trying to build this project with ./buildscript.sh
, and I'm getting the following error:
Configuring build.gradle for 1.12.2-21.2.0-BETA5
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/4.9/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'MinecraftTransportSimulator'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve net.minecraftforge.gradle:ForgeGradle:3.+.
Required by:
project :
> No cached version listing for net.minecraftforge.gradle:ForgeGradle:3.+ available for offline mode.
> No cached version listing for net.minecraftforge.gradle:ForgeGradle:3.+ available for offline mode.
* 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 1s
This is my java version:
➜ MinecraftTransportSimulator git:(master) java -version
openjdk version "1.8.0_332"
OpenJDK Runtime Environment (build 1.8.0_332-b04)
OpenJDK 64-Bit Server VM (build 25.332-b04, mixed mode)
Odd, why is it looking for jorbis with the forge stuff... You are on the right track with not using the --offline
flag. That's just there to speed up building to make it not re-pull the dependencies. But it shouldn't be trying to pull those dependencies from the forge systems... What's the build.gradle file look like on your end?
build.gradle is pulled from this git repo, and I have not made any modification to it:
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
//maven { url = "https://repo.spongepowered.org/maven" }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
//classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
}
}
//Apply plugins
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
//apply plugin: 'org.spongepowered.mixin'
//Set file name.
version = "1.12.2-21.2.0-BETA5"
group= "minecrafttransportsimulator"
archivesBaseName = "Immersive Vehicles"
//Options for Java version to compile to.
//java.toolchain.languageVersion = JavaLanguageVersion.of(8)
//Don't need these with toolchain?
sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
options.compilerArgs << "-Xlint:deprecation" << "-Xlint:unchecked"
}
//Minecraft mappings and run configs.
minecraft {
// The mappings can be changed at any time, and must be in the following format.
// Channel: Version:
// snapshot YYYYMMDD Snapshot are built nightly.
// stable # Stables are built at the discretion of the MCP team.
// official MCVersion Official field/method names from Mojang mapping files
mappings channel: 'stable', version: '39-1.12'
//Run configurations.
runs {
client {
workingDirectory project.file('run')
}
server {
workingDirectory project.file('run')
}
}
}
repositories {
maven { url = 'https://mvnrepository.com/artifact/org.jcraft/jorbis'}
//Location of the maven that hosts JEI files
maven {url = "https://dvs1.progwml6.com/files/maven/"}
}
//Configuration that holds jars to include in the jar
configurations {
embed
compile.extendsFrom(embed)
}
//Specify dependencies.
dependencies {
//Version of Minecraft to use.
minecraft 'net.minecraftforge:forge:1.12.2-14.23.5.2859'
//Set sound code bits as embeds so they are included into the jar.
embed(group: 'com.googlecode.soundlibs', name: 'jlayer', version: '1.0.1.4')
embed(group: 'org.jcraft', name: 'jorbis', version: '0.0.17')
//Compile against the JEI API but do not include it at runtime
compileOnly fg.deobf("mezz.jei:jei_1.12.2:4.16.1.302:api")
//At runtime, use the full JEI jar
//Disabled as Access Transformers don't work on FG 3.0 runtimes despite them saying they do.
//Not a huge issue, as it just prevents using JEI in-dev, and we already have it working so don't really need to test.
//runtimeOnly fg.deobf("mezz.jei:jei_1.12.2:4.16.1.302")
//Embed mixins into the code.
//embed('org.spongepowered:mixin:0.8.5')
//Apply Mixin AP ForgeGradle.
//annotationProcessor 'org.spongepowered:mixin:0.8.5:processor'
}
//Set mixin properties.
//Note, createSrgToMcp and createMcpToSrg tasks need to be run before this.
//mixin {
//add sourceSets.main, "mts.refmap.json"
//config "mts.mixins.json"
//}
//Here is where we zip up all embeds and add them to our jar.
jar {
from {
configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
}
}
//Now compile the mod.
jar.finalizedBy('reobfJar')
I also tried to build it without --offline
. However, I'm getting another error:
> Could not resolve net.minecraftforge:forge:1.12.2-14.23.5.2859_mapped_stable_39-1.12.
> Could not get resource 'https://mvnrepository.com/artifact/org.jcraft/jorbis/net/minecraftforge/forge/1.12.2-14.23.5.2859_mapped_stable_39-1.12/forge-1.12.2-14.23.5.2859_mapped_stable_39-1.12.pom'.
> Could not GET 'https://mvnrepository.com/artifact/org.jcraft/jorbis/net/minecraftforge/forge/1.12.2-14.23.5.2859_mapped_stable_39-1.12/forge-1.12.2-14.23.5.2859_mapped_stable_39-1.12.pom'. Received status code 403 from server: Forbidden
Could I get your entire log output, or have you do some screen-share on Discord? I'm afraid to nuke what I have on my machine if it'll prevent me from being able to do dev work.