【发布时间】:2021-12-05 09:34:34
【问题描述】:
我正在尝试使用ManifestClasspath 插件来解决CreateProcess error=206, The filename or extension is too long 错误。我的build.gradle 看起来像这样:
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
maven {
url "http://repo.maven.apache.org/maven2"
// allowInsecureProtocol = true
}
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
classpath "org.owasp:dependency-check-gradle:$dependencyCheckVersion"
classpath("org.springframework.cloud:spring-cloud-contract-gradle-plugin:${springCloudContractVersion}")
classpath("org.springframework.cloud:spring-cloud-contract-pact:${springCloudContractVersion}")
classpath "gradle.plugin.ua.eshepelyuk:ManifestClasspath:1.0.0"
}
}
ext['elasticsearch.version'] = "7.1.0"
allprojects {
apply plugin: 'maven'
apply plugin: "ua.eshepelyuk.ManifestClasspath"
...
}
但是,现在我收到了这个错误:
Could not GET 'http://repo.maven.apache.org/maven2/gradle/plugin/ua/eshepelyuk/ManifestClasspath/1.0.0/ManifestClasspath-1.0.0.pom'. Received status code 501 from server: HTTPS Required
它需要使用https://plugins.gradle.org/m2/ 存储库,但它使用http://repo.maven.apache.org/maven2。如何指定它需要使用的存储库?
【问题讨论】:
标签: maven gradle build.gradle