在Zeroc ice 官网 https://zeroc.com/distributions/ice
给出的ice-demo地址 git clone -b 3.6 https://github.com/zeroc-ice/ice-demos.git
下来之后还要装 Berkeley DB,执行gradlew build时还是各种错.
于是就下载了 git clone https://github.com/zeroc-ice/ice-demos.git,然而master的代码并不能正常build
ice-demo的正确打开方式* What went wrong:
A problem occurred evaluating script.
> Could not resolve all dependencies for configuration ':demoIceDiscoveryHello:runtime'.
> Could not find com.zeroc:icediscovery:null.
Searched in the following locations:
https://repo.zeroc.com/nexus/content/repositories/thirdparty/com/zeroc/icediscovery/null/icediscovery-null.pom
https://repo.zeroc.com/nexus/content/repositories/thirdparty/com/zeroc/icediscovery/null/icediscovery-null.jar
https://repo.zeroc.com/nexus/content/repositories/releases/com/zeroc/icediscovery/null/icediscovery-null.pom
https://repo.zeroc.com/nexus/content/repositories/releases/com/zeroc/icediscovery/null/icediscovery-null.jar
Required by:
com.zeroc:demoIceDiscoveryHello:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
解决办法:找到ice-demo/java/gradle/ice.gradle,在文件末尾加入
<span style="font-size:18px;">dependencies {
compile 'com.zeroc:ice:3.6.2'
compile 'com.zeroc:icediscovery:3.6.2'
compile 'com.zeroc:icebox:3.6.2'
compile 'com.zeroc:icegrid:3.6.2'
compile 'com.zeroc:icelocatordiscovery:3.6.2'
compile 'com.zeroc:icestorm:3.6.2'
}</span>