我正在使用cmd提示符窗口上的"gradle bootrun“运行我的gradle项目。
我得到的错误是:
- [https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.0.BUILD-SNAPSHOT/maven-metadata.xml](https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.0.BUILD-SNAPSHOT/maven-metadata.xml) _**<-- PRODUCES 404 ERROR when you go to page**_
- [https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.0.BUILD-SNAPSHOT/spring-boot-gradle-plugin-1.4.0.BUILD-SNAPSHOT.pom](https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.0.BUILD-SNAPSHOT/spring-boot-gradle-plugin-1.4.0.BUILD-SNAPSHOT.pom) _**<-- PRODUCES 404 ERROR when you go to page**_
- [https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.0.BUILD-SNAPSHOT/spring-boot-gradle-plugin-1.4.0.BUILD-SNAPSHOT.jar](https://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-gradle-plugin/1.4.0.BUILD-SNAPSHOT/spring-boot-gradle-plugin-1.4.0.BUILD-SNAPSHOT.jar) _**<-- PRODUCES 404 ERROR when you go to page**_ Required by: project :* GRADLE *
下面是我的build.gradle文件:
buildscript {
ext {
springBootVersion = '1.5.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.0.BUILD-SNAPSHOT") ***<-- THIS DOESN'T EXIST on repo.Spring.io. Only 1.2.0 = 5.x*** or ***<-- on repo.spring.io***
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
apply plugin: 'org.springframework.boot'
//apply plugin: 'war'
version = '0.0.1'
sourceCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
flatDir {
dirs 'repository'
}
mavenCentral()
}
ext {
springCloudVersion = 'Edgware.SR3'
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-aop')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.boot:spring-boot-starter-web')
compile("org.springframework.boot:spring-boot-devtools")
compile('org.springframework.boot:spring-boot-starter-actuator')
compile group: 'joda-time', name: 'joda-time'
compile group: 'com.myfolder', name: 'all_pfs', version: '7.1.9'
compile group: 'com.myfolder', name: 'pfs-client', version: '7.1.9'
compile group: 'com.myfolder.pfs.wic', name: 'pfs-wic', version: '1.1.0.RC3'
compile group: 'com.picketlink.picketlink', name: 'picketlink-fed', version: '2.0.3-SNAPSHOT'
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'commons-lang', name: 'commons-lang', version: '2.6'
compile group: 'org.apache.httpcomponents', name: 'httpclient'
compile group: 'xstream', name: 'xstream', version: '1.2.2'
compile group: 'javax.ejb', name: 'javax.ejb-api', version: '3.2'
compile group: 'io.springfox', name: 'springfox-swagger2', version:'2.6.1'
compile group: 'io.springfox', name: 'springfox-swagger-ui', version:'2.6.1'
compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
compile group: 'commons-beanutils', name: 'commons-beanutils', version: '1.8.3'
compile group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version: '1.9.13'
compile group: 'org.springframework', name: 'spring-messaging', version: '4.2.6.RELEASE'
compile group: 'org.springframework', name: 'spring-websocket', version: '4.3.11.RELEASE'
compile('org.springframework.boot:spring-boot-starter-test')
compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '1.5.6.RELEASE'
testCompile group: 'com.microsoft.sqlserver', name: 'sqljdbc4', version: '4.0'
compile name: "sqljdbc4-4.0"
//Added to implement slf4j logger
compile group: 'org.slf4j', name:'slf4j-api', version: '1.7.2'
//compile group: 'ch.qos.logback', name:'logback-classic', version: '1.0.9'
//compile group: 'ch.qos.logback', name:'logback-core', version: '1.0.9'
// jsoup HTML parser library @ https://jsoup.org/
compile 'org.jsoup:jsoup:1.11.3'
compile group: 'com.datastax.cassandra',name: 'cassandra-driver-core',version:'3.2.0'
compile('org.springframework.boot:spring-boot-starter-data-cassandra')
compile('org.projectlombok:lombok:1.18.2')
compile group: 'com.myfolder.service.fusion.audit.client', name: 'audit-client', version: '2.0.1.RELEASE'
compile group: 'org.apache.httpcomponents', name: 'httpasyncclient', version: '4.1.3'
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}但是,这一切都是从org.Spring Frawork.boot/..context/web.client开始的,并不存在:
这里有几张图片要展示:



我删除了Netbeans缓存让Netbeans重建项目和起诉..。但是,没有joy!
任何帮助或洞察力都将不胜感激。
发布于 2018-11-27 21:49:47
您已经将您的buildscript配置为使用Maven Central作为它的唯一存储库:
repositories {
mavenCentral()
}您还将其配置为依赖于1.4.0.BUILD- Spring的Gradle插件的快照:
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.4.0.BUILD-SNAPSHOT")
}快照不是发布到Maven Central,而是发布在那里。里程碑和快照被发布到https://repo.spring.io。具体来说,快照可以从https://repo.spring.io/snapshot获得,里程碑可以从https://repo.spring.io/milestone获得。您可以找到1.4.0.BUILD-启动的Gradle插件这里的快照。
如果您想使用Spring的快照版本,应该将https://repo.spring.io/snapshot和https://repo.spring.io/milestone添加到配置的存储库中:
repositories {
mavenCentral()
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/milestone' }
}里程碑存储库是必需的,因为Spring快照可能具有里程碑依赖性。
或者,特别是考虑到1.4.0现在已经相当陈旧,不再受支持,您可能希望升级到更新的版本。在编写本报告时,1.5.17 writing是1.x行的最新版本,2.1.0是writing的最新版本。
您可以升级到1.5.17,如下所示:
buildscript {
ext {
springBootVersion = '1.5.17.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion")
}
}https://stackoverflow.com/questions/53505727
复制相似问题