我正在尝试将微服务部署到累积平台。我通过创建指南(Microservice SDK for Java)中所述的应用程序来手动进行了尝试。该应用程序已成功创建,但zip文件的上传失败,并显示错误“无此文件或目录”。 Microservice package and deploy中的实用工具失败,并出现相同的错误。 (见下文)
./microservice deploy -n hello-world .....
[INFO] Read input
[INFO] Start deployment
[INFO] Application with name hello-world not found, add new application
[INFO] Application name: hello-world id: 878
[INFO] Upload file hello-world.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 98.7M 0 204 100 98.7M 1 563k 0:02:59 0:02:59 --:--:-- 165k
[WARNING] error durning upload
Failed to deploy microservice application : No such file or directory
[INFO] End deployment
我缺少什么吗?我根据累积性指南中的描述逐步创建了微服务。任何提示将不胜感激。
答案 0 :(得分:0)
也许这会对您有所帮助。我们也遇到了这个问题,据我所知,这与程序包的名称有关,这就是我们在pom文件中设置所有内容的原因:
<build>
<plugins>
...
<plugin>
<groupId>com.nsn.cumulocity.clients-java</groupId>
<artifactId>microservice-package-maven-plugin</artifactId>
<version>${c8y.version}</version>
<configuration>
<packageName>${microservice.name}</packageName>
<skipMicroserviceUpload>false</skipMicroserviceUpload>
<application>
<name>${microservice.name}</name>
</application>
<credentials>
<url>${microservice.deploy.url}</url>
<username>${microservice.deploy.username}</username>
<password>${microservice.deploy.password}</password>
</credentials>
</configuration>
<executions>
<execution>
<id>package</id>
<phase>package</phase>
<goals>
<goal>package</goal>
</goals>
<configuration>
<name>${microservice.name}</name>
<image>${microservice.name}</image>
<encoding>UTF-8</encoding>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>