我正在使用gradlew 4.2.10,在发布时,在:verifyRelease阶段出现错误。
由以下原因引起:org.gradle.internal.service.UnknownServiceException:ProjectScopeServices中没有StyledTextOutputFactory类型的服务
这是我的build.gradle中的内容
ext.versions = [
cglib : '2.2',
checkstyle : '6.12.1',
clover : '4.2.0',
cucumber : '1.2.2',
daMetricsConfig : '0.6.0',
findbugs : '3.0.1',
gradleAxionReleasePlugin : '1.3.4',
gradleCloverPlugin : '2.2.1',
gradleCPDPlugin : '0.5',
gradleCucumberPlugin : '0.8',
gradleSpringDependencyManagementPlugin: '1.0.5.RELEASE',
hadoopLoggingAppenders : '0.0.8',
isoftOne : '5.1.9',
junit : '4.12',
pmd : '5.4.1',
restAssured : '3.0.1',
sharedComponents : '0.1.12',
solr : '4.10.3-cdh5.10.2',
sonarQube : '2.4-rc1',
spock : '1.1-groovy-2.4',
spockReports : '1.2.10',
springBoot : '1.5.6.RELEASE',
springDataHadoop : '2.5.0.RELEASE',
staticAnalysisTools : '0.0.6',
]
ext.libraries = [
cglib : "cglib:cglib-nodep:${versions.cglib}",
checkstyle : "com.puppycrawl.tools:checkstyle:${versions.checkstyle}",
clover : "org.openclover:clover:${versions.clover}",
cucumberJunit : "info.cukes:cucumber-junit:1.2.5",
cucumberJava : "info.cukes:cucumber-java:1.2.5",
cucumberGroovy : "info.cukes:cucumber-groovy:${versions.cucumber}",
cucumberCore : "info.cukes:cucumber-core:${versions.cucumber}",
daMetricsConfig : "org.oclc.dataaccess.config:da-metrics-config:${versions.daMetricsConfig}",
findbugs : "com.google.code.findbugs:findbugs:${versions.findbugs}",
gradleCucumberPlugin : "com.github.samueltbrown:gradle-cucumber-plugin:${versions.gradleCucumberPlugin}",
gradleAxionReleasePlugin : "pl.allegro.tech.build:axion-release-plugin:${versions.gradleAxionReleasePlugin}",
gradleCloverPlugin : "com.bmuschko:gradle-clover-plugin:${versions.gradleCloverPlugin}",
gradleCPDPlugin : "de.aaschmid.gradle.plugins:gradle-cpd-plugin:${versions.gradleCPDPlugin}",
gradleSpringDependencyManagementPlugin: "io.spring.gradle:dependency-management-plugin:${versions.gradleSpringDependencyManagementPlugin}",
gradleSpringBootPlugin : "org.springframework.boot:spring-boot-gradle-plugin:${versions.springBoot}",
hadoopLoggingAppenders : "org.oclc.hadoop.logging.appenders:logback-appender:${versions.hadoopLoggingAppenders}",
isoftOne : "org.oclc.isoftOne:isoftOne:${versions.isoftOne}",
junit : "junit:junit:${versions.junit}",
pmd : "net.sourceforge.pmd:pmd-core:${versions.pmd}",
restAssured : "io.rest-assured:rest-assured:${versions.restAssured}",
sharedComponents : "org.oclc.search.shared:shared-components:${versions.sharedComponents}",
solrJ : "org.apache.solr:solr-solrj:${versions.solr}",
sonarQube : "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${versions.sonarQube}",
spock : "org.spockframework:spock-core:${versions.spock}",
spockReports : "com.athaydes:spock-reports:${versions.spockReports}",
springBoot : "org.springframework.boot:spring-boot:${versions.springBoot}",
springDataSolr : "org.springframework.data:spring-data-solr:${versions.springBoot}",
springDataHadoop : "org.springframework.data:spring-data-hadoop:${versions.springDataHadoop}",
staticAnalysisTools : "org.oclc.dataaccess:static-analysis-tools:${versions.staticAnalysisTools}",
// Spring Boot Managed Dependencies
// https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-dependency-versions.html
groovy : 'org.codehaus.groovy:groovy-all',
springBootAutoConfigure : 'org.springframework.boot:spring-boot-autoconfigure',
springBootStarterTest : 'org.springframework.boot:spring-boot-starter-test',
springBootStarterWeb : 'org.springframework.boot:spring-boot-starter-web',
springBootActuator : 'org.springframework.boot:spring-boot-actuator',
springKafka : 'org.springframework.kafka:spring-kafka',
springKafkaTest : 'org.springframework.kafka:spring-kafka-test',
springTest : 'org.springframework:spring-test'
]
ext.requiredRepositories = {
mavenLocal()
mavenCentral()
maven {
url "${project.snapshotsRepoUrl}"
}
maven {
url "${project.releasesRepoUrl}"
}
maven {
url "${project.legacyReleasesRepoUrl}"
}
jcenter()
}
我尝试更改gradle版本和依赖项管理插件,但存在相同错误
gradlew-wrapper.properties中的内容如下
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists