当前位置: 首页 > 工具软件 > Zeroc ICE > 使用案例 >

Zero ICE demo

栾景胜
2023-12-01

在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的正确打开方式
1.下载ice: https://zeroc.com/distributions/ice  上有各种平台的安装方法,这次测试是在windows 7上安装的,最好安装到ice默认的安装路径下,不要相信gradle.properties 文件中的iceHome配置,已尝试过各种配置,都无法生效,如果有配置成功的同学可以留言指导一下,如果按照默认配置,应该就跨过了一个大坑

2.下载demo  git clone https://github.com/zeroc-ice/ice-demos.git 需要用到git
3. cd ice-demos 执行gradlew build 会出现下面的错误
* 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>


版本号和依赖的包都是根据报错一个一个加的,可以尝试一下
 类似资料:

相关阅读

相关文章

相关问答