【发布时间】:2019-03-06 16:34:19
【问题描述】:
我设法根据documentation 将一个独立的微服务 实例部署到 Cumulocity 平台中。 将微服务部署到平台后,我可以订阅服务并对服务进行 REST 调用,因此一切都按预期工作。 Cumulocity 微服务 SDK 基于 Maven,因此我指定了正确的 pom.xml。
我遇到的问题是我在项目中也启用了 Gradle,并且在 Gitlab 中基于 Gradle 设置了 CI,尽管在 Maven 中一切正常,但 Gradle 无法识别微服务 SDK 包,我找不到一种使它工作的方法。例如,无法识别 SDK 附带的特定微服务注释:
error: cannot find symbol @MicroserviceApplication
我当前的 Maven 规范包括:
<plugin>
<groupId>com.nsn.cumulocity.clients-java</groupId>
<artifactId>microservice-package-maven-plugin</artifactId>
<version>${c8y.version}</version>
<configuration>
...
</configuration>
<executions>
<execution>
...
</execution>
</executions>
</plugin>
我当前的 Gradle 规范包括:
dependencies {
compile 'com.nsn.cumulocity.clients-java:java-client:8.13.0'
}
我可以重写 CI 规范以仅使用 Maven,但我想知道,有没有办法让 Gradle 识别来自 Maven 的 Cumulocity 微服务 SDK 插件?
【问题讨论】:
标签: maven spring-boot gradle cumulocity