我将 jib 添加到 pom.xml 文件中,如下所示:
<properties>
<docker.org>springcloudstream</docker.org>
<docker.version>${project.version}</docker.version>
</properties>
...
<build>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>jib-maven-plugin</artifactId>
<version>2.1.0</version>
<configuration>
<from>
<image>springcloud/openjdk</image>
</from>
<to>
<image>${docker.org}/${project.artifactId}:${docker.version}</image>
</to>
<container>
<useCurrentTimestamp>true</useCurrentTimestamp>
</container>
</configuration>
</plugin>
</plugins>
</build>
运行以下构建命令后,
./mvnw package jib:dockerBuild
我收到以下错误。
[ERROR] Failed to execute goal com.google.cloud.tools:jib-maven-plugin:2.1.0:dockerBuild (default-cli) on project usage-detail-sender-kafka: Unable to parse configuration of mojo com.google.cloud.tools:jib-maven-plugin:2.1.0:dockerBuild for parameter useCurrentTimestamp: Cannot find 'useCurrentTimestamp' in class com.google.cloud.tools.jib.maven.JibPluginConfiguration$ContainerParameters
UseCurrentTimestamp 已在配置中。经过网上搜索,我只找到一个条目:https ://github.com/GoogleContainerTools/jib/issues/413 。我在页面上看不到解决方案。
什么不见了?