Closed zhangjiayu139 closed 2 years ago
@zhangjiayu139 Your issue is due to a conflict between your configuration and a higher version of Gradle. The official documentation might be based on Gradle 7.x, which does not support the use of HTTP protocol in maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
with higher versions; HTTPS is required.
Your Environment(您的使用环境)
Expected Behavior(您期望的结果)
Spring Boot 2.6.8 + Gradle integration with smart-doc causes an error. Integration code: ` buildscript { repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } maven { url = uri("https://plugins.gradle.org/m2/") } mavenCentral() } dependencies { classpath 'com.github.shalousun:smart-doc-gradle-plugin:2.4.5' } } apply(plugin = "com.github.shalousun.smart-doc")
plugins { id 'org.springframework.boot' version '2.6.8' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id "com.github.shalousun.smart-doc" version "2.4.5" id 'java' }
group = 'com.study' version = '0.0.1-SNAPSHOT' sourceCompatibility = '1.8'
configurations { compileOnly { extendsFrom annotationProcessor } }
repositories { mavenCentral() }
dependencies { //security implementation 'org.springframework.boot:spring-boot-starter-security' // jjwt implementation 'io.jsonwebtoken:jjwt:0.9.1' implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' developmentOnly 'org.springframework.boot:spring-boot-devtools' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' annotationProcessor 'org.projectlombok:lombok' //druid mysql connection pool implementation 'com.alibaba:druid-spring-boot-starter:1.2.3' //mysql runtimeOnly 'mysql:mysql-connector-java:5.1.40' //mybatis-plus implementation 'com.baomidou:mybatis-plus-boot-starter:3.5.1' //mapStruct implementation 'org.mapstruct:mapstruct:1.4.2.Final' annotationProcessor 'org.mapstruct:mapstruct-processor:1.4.2.Final' // redis implementation 'org.springframework.boot:spring-boot-starter-data-redis' //common-lang3 implementation 'org.apache.commons:commons-lang3:3.12.0' //hutool implementation 'cn.hutool:hutool-all:5.8.1' // fastjson implementation 'com.alibaba:fastjson:1.2.83' //smart-doc testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' }
smartdoc { configFile = file("src/main/resources/smart-doc.json")
} tasks.named('test') { useJUnitPlatform() } `
Current Behavior(当前结果)
error: A problem occurred configuring root project 'authDemo'.
Try:
Exception is: org.gradle.api.ProjectConfigurationException: A problem occurred configuring root project 'authDemo'. at org.gradle.configuration.project.LifecycleProjectEvaluator.wrapException(LifecycleProjectEvaluator.java:84) at org.gradle.configuration.project.LifecycleProjectEvaluator.addConfigurationFailure(LifecycleProjectEvaluator.java:77) at org.gradle.configuration.project.LifecycleProjectEvaluator.access$400(LifecycleProjectEvaluator.java:55) at org.gradle.configuration.project.LifecycleProjectEvaluator$EvaluateProject.lambda$run$0(LifecycleProjectEvaluator.java:111) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$applyToMutableState$0(DefaultProjectStateRegistry.java:360) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.lambda$withProjectLock$2(DefaultProjectStateRegistry.java:408) at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:270) at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:408) at
Possible Solution(bug解决建议)
Steps to Reproduce (Bug产生步骤,请尽量提供用例代码)
1. 2. 3. 4.
Context(Bug影响描述)