在使用gradle編譯時(shí)傅是,出現(xiàn)如下錯(cuò)誤:
J:\zkclient-master>gradlew
FAILURE: Build failed with an exception.
Where:
Build file 'J:\zkclient-master\build.gradle' line: 9
7What went wrong:
A problem occurred evaluating root project 'zkclient'.
No such property: sonatypeUsername for class: org.gradle.api.publication.maven
.internal.ant.DefaultGroovyMavenDeployer
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 2.82 secs
解決
在項(xiàng)目根目錄創(chuàng)建名為gradle.properties的屬性文件锈嫩,在文件中輸入下面的內(nèi)容:
sonatypeUsername=
sonatypePassword=
sonatypeRepo=
然后保存,再編譯吟孙,該錯(cuò)誤即可消除丧鸯。