gpt4 book ai didi

compiler-errors - Gradle错误-除了 ''\n''以外的其他信息;反正

转载 作者:行者123 更新时间:2023-12-02 10:42:14 27 4
gpt4 key购买 nike

我在执行一个Gradle任务时遇到此错误。

:46:52 * Where:
14:46:52 Initialization script '/production/builds/jenkins_slave01/gradle-1.6/init.d/extra1.common-thids.gradle' line: 119
14:46:52
14:46:52 * What went wrong:
14:46:52 Could not compile initialization script '/production/builds/jenkins_slave01/gradle-1.6/init.d/extra1.common-thids.gradle'.
14:46:52 > startup failed:
14:46:52 initialization script '/production/builds/jenkins_slave01/gradle-1.6/init.d/extra1.common-thids.gradle': 119: expecting anything but ''\n''; got it anyway @ line 119, column 57.
14:46:52 ("$buildDir/reports/tests/IT")
14:46:52 ^
14:46:52
14:46:52 1 error
14:46:52
14:46:52
14:46:52 * Try:
14:46:52 Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
14:46:52
14:46:53 BUILD FAILED

该任务背后的Gradle代码是:
   task integrationTest( type: Test) {
/Alway run tests
outputs.upToDateWhen { false }
ignoreFailuers = true

testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = sourceSets.integrationTest.runtimeClasspath

testReportDir = file("$buildDir/reports/tests/IT")
testResultsDir = file("$buildDir/test-results/IT")

// This section in integrationTest and acceptanceTest task is actually not required here as jacocoagent.jar will be passed to Tomcat JVM instance than Gradle's instance.
// Following Jacoco section is required only in Jenkins
// But a developer can uncomment them if they want this feature to work for their
// Desktop local Gradle builds.

// This section in integrationTest and acceptanceTest task is actually not required here as jacocoagent.jar will be passed to Tomcat JVM instance than Gradle's instance.
//jacoco {
//The following vars works ONLY with 1.6 of Gradle
//destPath = file("$buildDir/jacoco/IT/jacocoIT.exec")
//classDumpPath = file("$buildDir/jacoco/UT/classpathdumps") --- commenting this out so we don't get errors - MG
//
//Following vars works only with versions >= 1.7 version of Gradle
//destinationFile = file("$buildDir/jacoco/UT/jacocoUT.exec")
// classDumpFile = file("$buildDir/jacoco/UT/classpathdumps")
//}
}

最佳答案

哦哦..我为不正确放置的'} {括号而挠了挠头,却忘了一件简单的事情。

/Alway run tests

上面的COMMENT行应该类似于以下内容,即我缺少 /
//Alway run tests

关于compiler-errors - Gradle错误-除了 ''\n''以外的其他信息;反正,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27533830/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com