У меня проблемы с протоколами HTTP и HTTPS - PullRequest
2 голосов
/ 05 февраля 2020

Я новичок в программировании. Фактически, я узнал все, что знаю о gradle, через эксперименты, пытаясь заставить этот материал работать Я пытаюсь создать файл .jar из старого файла github, и на прошлой неделе я пытался заставить эту вещь работать, и она всегда выдает ошибки. В настоящее время я как никогда близок к созданию этой вещи, но есть проблема.

Пока я пытаюсь собрать свой jar-файл, я получаю сообщение об ошибке: Не удалось разрешить все зависимости для конфигурации ': classpath'. И много отзывов, показанных ниже.

PS J:\MC\MC2\.minecraft\mods\ElectricalAge-releases-1.12\ElectricalAge-releases-1.12> .\gradlew

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'ElectricalAge-releases-1.12'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve de.undercouch:gradle-download-task:1.2.
     Required by:
         :ElectricalAge-releases-1.12:unspecified
      > Could not HEAD 'http://repo1.maven.org/maven2/de/undercouch/gradle-download-task/1.2/gradle-download-task-1.2.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/de/undercouch/gradle-download-task/1.2/gradle-download-task-1.2.pom'. Received status code 403 from server: Forbidden
   > Could not resolve com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6.
     Required by:
         :ElectricalAge-releases-1.12:unspecified
      > Could not HEAD 'http://repo1.maven.org/maven2/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.6/gradle-bintray-plugin-1.6.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.6/gradle-bintray-plugin-1.6.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.0.1-2.
     Required by:
         :ElectricalAge-releases-1.12:unspecified
      > Could not HEAD 'http://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.1-2/kotlin-gradle-plugin-1.0.1-2.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-gradle-plugin/1.0.1-2/kotlin-gradle-plugin-1.0.1-2.pom'. Received status code 403 from server: Forbidden
   > Could not resolve net.md-5:SpecialSource:1.7.3.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/net/md-5/SpecialSource/1.7.3/SpecialSource-1.7.3.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/net/md-5/SpecialSource/1.7.3/SpecialSource-1.7.3.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.apache.httpcomponents:httpclient:4.3.3.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/apache/httpcomponents/httpclient/4.3.3/httpclient-4.3.3.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.apache.httpcomponents:httpmime:4.3.3.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/apache/httpcomponents/httpmime/4.3.3/httpmime-4.3.3.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/apache/httpcomponents/httpmime/4.3.3/httpmime-4.3.3.pom'. Received status code 403 from server: Forbidden
   > Could not resolve com.github.abrarsyed.jastyle:jAstyle:1.2.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/com/github/abrarsyed/jastyle/jAstyle/1.2/jAstyle-1.2.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/com/github/abrarsyed/jastyle/jAstyle/1.2/jAstyle-1.2.pom'. Received status code 403 from server: Forbidden
   > Could not resolve net.sf.trove4j:trove4j:2.1.0.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/net/sf/trove4j/trove4j/2.1.0/trove4j-2.1.0.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/net/sf/trove4j/trove4j/2.1.0/trove4j-2.1.0.pom'. Received status code 403 from server: Forbidden
   > Could not resolve com.google.code.gson:gson:2.2.4.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > de.oceanlabs.mcp:RetroGuard:3.6.6
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > de.oceanlabs.mcp:mcinjector:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/com/google/code/gson/gson/2.2.4/gson-2.2.4.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/com/google/code/gson/gson/2.2.4/gson-2.2.4.pom'. Received status code 403 from server: Forbidden
   > Could not resolve com.google.guava:guava:18.0.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/com/google/guava/guava/18.0/guava-18.0.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/com/google/guava/guava/18.0/guava-18.0.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.ow2.asm:asm-debug-all:5.0.3.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.pom'. Received status code 403 from server: Forbidden
   > Could not resolve com.github.tony19:named-regexp:0.2.3.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/com/github/tony19/named-regexp/0.2.3/named-regexp-0.2.3.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/com/github/tony19/named-regexp/0.2.3/named-regexp-0.2.3.pom'. Received status code 403 from server: Forbidden
   > Could not resolve com.cloudbees:diff4j:1.1.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/com/cloudbees/diff4j/1.1/diff4j-1.1.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/com/cloudbees/diff4j/1.1/diff4j-1.1.pom'. Received status code 403 from server: Forbidden
   > Could not resolve net.sf.jopt-simple:jopt-simple:4.6.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > de.oceanlabs.mcp:RetroGuard:3.6.6
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > de.oceanlabs.mcp:mcinjector:3.2-SNAPSHOT
      > Could not GET 'http://repo1.maven.org/maven2/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.pom'. Received status code 501 from server: HTTPS Required
      > Could not GET 'http://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.eclipse.core:jobs:3.5.300-v20130429-1813.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/eclipse/core/jobs/3.5.300-v20130429-1813/jobs-3.5.300-v20130429-1813.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/eclipse/core/jobs/3.5.300-v20130429-1813/jobs-3.5.300-v20130429-1813.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.eclipse:osgi:3.9.1-v20130814-1242.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/eclipse/osgi/3.9.1-v20130814-1242/osgi-3.9.1-v20130814-1242.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/eclipse/osgi/3.9.1-v20130814-1242/osgi-3.9.1-v20130814-1242.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.eclipse.core:contenttype:3.4.200-v20130326-1255.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/eclipse/core/contenttype/3.4.200-v20130326-1255/contenttype-3.4.200-v20130326-1255.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/eclipse/core/contenttype/3.4.200-v20130326-1255/contenttype-3.4.200-v20130326-1255.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.eclipse.core:resources:3.2.1-R32x_v20060914.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/eclipse/core/resources/3.2.1-R32x_v20060914/resources-3.2.1-R32x_v20060914.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/eclipse/core/resources/3.2.1-R32x_v20060914/resources-3.2.1-R32x_v20060914.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.eclipse.equinox:common:3.6.200-v20130402-1505.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/eclipse/equinox/common/3.6.200-v20130402-1505/common-3.6.200-v20130402-1505.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/eclipse/equinox/common/3.6.200-v20130402-1505/common-3.6.200-v20130402-1505.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.eclipse.text:org.eclipse.text:3.5.101.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/eclipse/text/org.eclipse.text/3.5.101/org.eclipse.text-3.5.101.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/eclipse/text/org.eclipse.text/3.5.101/org.eclipse.text-3.5.101.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.eclipse.jgit:org.eclipse.jgit:3.2.0.201312181205-r.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/eclipse/jgit/org.eclipse.jgit/3.2.0.201312181205-r/org.eclipse.jgit-3.2.0.201312181205-r.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/eclipse/jgit/org.eclipse.jgit/3.2.0.201312181205-r/org.eclipse.jgit-3.2.0.201312181205-r.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.eclipse.equinox:preferences:3.5.100-v20130422-1538.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/eclipse/equinox/preferences/3.5.100-v20130422-1538/preferences-3.5.100-v20130422-1538.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/eclipse/equinox/preferences/3.5.100-v20130422-1538/preferences-3.5.100-v20130422-1538.pom'. Received status code 403 from server: Forbidden
   > Could not resolve net.sf.jopt-simple:jopt-simple:4.6.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not GET 'http://repo1.maven.org/maven2/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.pom'. Received status code 501 from server: HTTPS Required
      > Could not GET 'http://jcenter.bintray.com/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.eclipse.core:runtime:3.9.0-v20130326-1255.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > net.minecraftforge.srg2source:Srg2Source:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/eclipse/core/runtime/3.9.0-v20130326-1255/runtime-3.9.0-v20130326-1255.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/eclipse/core/runtime/3.9.0-v20130326-1255/runtime-3.9.0-v20130326-1255.pom'. Received status code 403 from server: Forbidden
   > Could not resolve org.ow2.asm:asm-debug-all:5.0.3.
     Required by:
         :ElectricalAge-releases-1.12:unspecified > net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT > de.oceanlabs.mcp:mcinjector:3.2-SNAPSHOT
      > Could not HEAD 'http://repo1.maven.org/maven2/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.pom'. Received status code 501 from server: HTTPS Required
      > Could not HEAD 'http://jcenter.bintray.com/org/ow2/asm/asm-debug-all/5.0.3/asm-debug-all-5.0.3.pom'. Received status code 403 from server: Forbidden

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Это меня очень огорчает. Я зашел так далеко и остановился, потому что мой gradle не может получить доступ к этим веб-сайтам, так как они требуют HTTPS-протоколов, в то время как мой gradle пытается получить к ним доступ по протоколам HTTP.

Я предполагаю, что это потому, что когда этот файл был сделано, gradle еще не переключился на использование HTTPS. Я просмотрел все файлы настроек, которые смог найти, и изменил все зависимости на HTTPS-ссылки, но безрезультатно.

Имейте в виду, что я новичок в коде, поэтому вам придется пройтись по нему все. Вот мои каталоги файлов внутри файла github.

Каталоги файлов

Спасибо, если вы можете помочь. А также, я не написал ни одного из этих файлов. Все они были написаны авторами на github: https://github.com/Electrical-Age/ElectricalAge/tree/releases/1.12

1 Ответ

1 голос
/ 05 февраля 2020

Вы правы, проблема в том, что в ветке releases/1.12 этого репо используется очень старая версия Gradle.

Версия Gradle, используемая командой gradlew, определяется файл gradle/wrapper/gradle-wrapper.properties. Если вы отредактируете этот файл и измените свойство distributionUrl, чтобы использовать gradle-4.4-all.zip (как в develop ветви этого репо) вместо gradle-2.0-all.zip, вы сможете, по крайней мере, построить проект.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...