Issue
I've recently gotten into modding Minecraft 1.7.10, and I'm setting up my folders/environment. All I've done so far is as follows;
- Extracted the 1.7.10 src files from the forge website to the file I plan on modding in.
- made a system variable in my environmental variables called Path, which directs to my JDK.
- Ran gradlew.bat (failed)
And this is where I failed. I have the main error I got straight from the cmd prompt, used cmd /k switch to keep it open listed below.
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring root project 'Modding Project'.
Could not resolve all dependencies for configuration ':classpath'. Could not resolve org.eclipse.equinox:common:[3.2.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:jobs:3.5.300-v20130429-1813 :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:contenttype:3.4.200-v20130326-1255 :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.equinox:preferences:3.5.100-v20130422-1538 > Failed to list versions for org.eclipse.equinox:common. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/equinox/common/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/equinox/common/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.equinox:preferences:[3.2.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:contenttype:3.4.200-v20130326-1255 > Failed to list versions for org.eclipse.equinox:preferences. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/equinox/preferences/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/equinox/preferences/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.equinox:registry:[3.2.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:contenttype:3.4.200-v20130326-1255 > Failed to list versions for org.eclipse.equinox:registry. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/equinox/registry/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/equinox/registry/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.core.runtime:compatibility:[3.1.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:resources:3.2.1-R32x_v20060914 > Failed to list versions for org.eclipse.core.runtime:compatibility. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/core/runtime/compatibility/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/core/runtime/compatibility/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.core:expressions:[3.1.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:resources:3.2.1-R32x_v20060914 > Failed to list versions for org.eclipse.core:expressions. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/core/expressions/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/core/expressions/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.core:filesystem:[1.0.0,2.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:resources:3.2.1-R32x_v20060914 > Failed to list versions for org.eclipse.core:filesystem. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/core/filesystem/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/core/filesystem/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse:osgi:[3.7.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:runtime:3.9.0-v20130326-1255 > Failed to list versions for org.eclipse:osgi. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/osgi/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/osgi/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.equinox:common:[3.6.100,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:runtime:3.9.0-v20130326-1255 > Failed to list versions for org.eclipse.equinox:common. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/equinox/common/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/equinox/common/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.core:jobs:[3.2.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:runtime:3.9.0-v20130326-1255 > Failed to list versions for org.eclipse.core:jobs. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/core/jobs/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/core/jobs/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.equinox:registry:[3.4.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:runtime:3.9.0-v20130326-1255 > Failed to list versions for org.eclipse.equinox:registry. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/equinox/registry/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/equinox/registry/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.equinox:preferences:[3.4.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:runtime:3.9.0-v20130326-1255 > Failed to list versions for org.eclipse.equinox:preferences. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/equinox/preferences/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/equinox/preferences/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.core:contenttype:[3.3.0,4.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:runtime:3.9.0-v20130326-1255 > Failed to list versions for org.eclipse.core:contenttype. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/core/contenttype/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/core/contenttype/maven-metadata.xml'. Received status code 501 from server: HTTPS Required Could not resolve org.eclipse.equinox:app:[1.0.0,2.0.0). Required by: :Modding Project:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT > org.eclipse.core:runtime:3.9.0-v20130326-1255 > Failed to list versions for org.eclipse.equinox:app. > Unable to load Maven meta-data from http://repo1.maven.org/maven2/org/eclipse/equinox/app/maven-metadata.xml. > Could not GET 'http://repo1.maven.org/maven2/org/eclipse/equinox/app/maven-metadata.xml'. Received status code 501 from server: HTTPS Required
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 10.107 secs
I can provide the --stacktrace, --info or the --debug on request.. first post so I'm not sure what people need beyond the error. Thanks anyways!
Here is my build.gradle
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
apply plugin: 'forge'
version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"
minecraft {
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "eclipse"
}
dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"
// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
Now here is my NEW build.gradle thanks to your help, narrowing it down now.
FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring root project 'Modding Project'.
Could not resolve all dependencies for configuration ':classpath'. Could not download artifact 'com.github.jponge:lzma-java:1.3:lzma-java.jar' > Could not GET 'http://repo1.maven.org/maven2/com/github/jponge/lzma-java/1.3/lzma-java-1.3.jar'. Received status code 501 from server: HTTPS Required
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 7.195 secs
Solution
So as far as I understood repo1.maven.org/maven2
does not support http anymore. That is problem because 1.7.10 is shipped with gradle wrapper v2.0. In this version http was hardcoded. So you need to add repository by yourself.
Repository declaration looks like:
maven {
name = "maven"
url = "https://repo1.maven.org/maven2"
}
You need to add it to the buildscript and to the project.
It probably will look like that:
buildscript {
repositories {
mavenCentral()
maven {
name = "maven"
url = "https://repo1.maven.org/maven2"
}
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
}
}
apply plugin: 'forge'
version = "1.0"
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "modid"
repositories {
maven {
name = "maven"
url = "https://repo1.maven.org/maven2"
}
}
minecraft {
version = "1.7.10-10.13.4.1614-1.7.10"
runDir = "eclipse"
}
dependencies {
// you may put jars on which you depend on in ./libs
// or you may define them like so..
//compile "some.group:artifact:version:classifier"
//compile "some.group:artifact:version"
// real examples
//compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
//compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
// for more info...
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
// http://www.gradle.org/docs/current/userguide/dependency_management.html
}
processResources
{
// this will ensure that this task is redone when the versions change.
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
// replace version and mcversion
expand 'version':project.version, 'mcversion':project.minecraft.version
}
// copy everything else, thats not the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
}
}
Also you can upgrade your gradle version. But I prefer not to do it because ForgeGradle is not very stable.
Also you can use it as reference in case of further issues.
Answered By - Юрий Баринов
Answer Checked By - David Goodson (JavaFixing Volunteer)