臂架-“找不到'useCurrentTimestamp'”

我将臂架添加到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。我在页面上看不到解决方案。

缺少什么?

hopelove1983 回答:臂架-“找不到'useCurrentTimestamp'”

CHANGELOG指示useCurrentTimestamp已在2.0.0版本中弃用并删除:

Removed deprecated <container><useCurrentTimestamp> configuration in favor of <container><creationTime> with USE_CURRENT_TIMESTAMP

您似乎需要更换

<useCurrentTimestamp>true</useCurrentTimestamp>

使用

<creationTime>USE_CURRENT_TIMESTAMP</creationTime>
本文链接:https://www.f2er.com/2462961.html

大家都在问