6.x.修改gradle仓库构建
IDEA版本及gradle构建设置
在gradle指定仓库地址/wrapper/dists/找到与gradle wrapper相对应的gradle版本,在gradle的init.d/目录下新建init.gradle文件,内容如下:
allprojects{
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/jcenter/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
maven {
url 'http://私库地址/repository/gradle-distribution/'
allowInsecureProtocol = true
}
maven { url 'https://jitpack.io/' }
}
}
settingsEvaluated { settings ->
settings.pluginManagement {
repositories.clear()
repositories {
mavenLocal()
maven {
url 'http://私库地址/repository/gradle-distribution/'
allowInsecureProtocol = true
}
}
}
}
错误1
Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: ‘io.spring.nohttp’, version: ‘0.0.11’] was not found in any of the following sources:
allprojects{
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/jcenter/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
maven {
url 'http://私库地址/repository/gradle-distribution/'
allowInsecureProtocol = true
}
maven { url 'https://jitpack.io/' }
}
}
settingsEvaluated { settings ->
settings.pluginManagement {
repositories.clear()
repositories {
mavenLocal()
maven {
url 'http://私库地址/repository/gradle-distribution/'
allowInsecureProtocol = true
}
}
}
}
解决方式:maven仓库地址修改
allprojects{
repositories {
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/public/' }
maven { url 'https://maven.aliyun.com/repository/jcenter/' }
maven { url 'https://maven.aliyun.com/repository/google/' }
maven {
url 'https://maven.aliyun.com/repository/gradle-plugin/'
}
maven { url 'https://jitpack.io/' }
}
}
settingsEvaluated { settings ->
settings.pluginManagement {
repositories.clear()
repositories {
mavenLocal()
maven {
url 'https://maven.aliyun.com/repository/gradle-plugin/'
}
}
}
}
问题1
gradle本地仓库已经下载了上面nohttp-0.0.11.jar依赖的jar包,再更换上面代理仓库地址时,还是会提示相关依赖找不到。
构建完成之后,将init.gradle配置文件修改之前报错的,提示如下:
文章来源:https://www.toymoban.com/news/detail-822938.html
完成用时
文章来源地址https://www.toymoban.com/news/detail-822938.html
到了这里,关于spring-framework6.x版本源码构建的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!