Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spring-boot-maven-plugin sets imagePlatform even if it's empty #43424

Closed
wants to merge 1 commit into from

Conversation

vonZeppelin
Copy link
Contributor

A Docker image cannot be built with the spring-boot-maven-plugin:3.4.0 if Docker API version is less than 1.41. In particular, a Spring Boot project builds are failing in Bitbucket pipelines when no 'imagePlatform' option configured for the project with the following error

Docker API version must be at least 1.41 to support the 'imagePlatform' option, but current API version is 1.24

Using an empty <imagePlatform/> tag in the pom.xml doesn't help as Maven, most probably, assigns an empty string to the corresp. Java property.

The proposed fix is to check the config property for both null and empty string values.

@pivotal-cla
Copy link

@vonZeppelin Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@vonZeppelin Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Dec 5, 2024
@mhalbritter mhalbritter self-assigned this Dec 5, 2024
@mhalbritter mhalbritter changed the title spring-boot-maven-plugin:3.4.0 requires Docker API 1.41+ to build a Docker image spring-boot-maven-plugin always sets imagePlatform Dec 5, 2024
@mhalbritter mhalbritter added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Dec 5, 2024
@mhalbritter mhalbritter modified the milestones: 3.3.x, 3.4.x Dec 5, 2024
@mhalbritter mhalbritter changed the title spring-boot-maven-plugin always sets imagePlatform spring-boot-maven-plugin sets imagePlatform even if it's empty Dec 5, 2024
mhalbritter pushed a commit that referenced this pull request Dec 5, 2024
mhalbritter added a commit that referenced this pull request Dec 5, 2024
@mhalbritter
Copy link
Contributor

Thanks @vonZeppelin !

@mhalbritter mhalbritter modified the milestones: 3.4.x, 3.4.1 Dec 5, 2024
ndwlocatieservices added a commit to ndwnu/nls-routing-map-matcher that referenced this pull request Dec 31, 2024
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [nu.ndw.nls.springboot:test](https://dev.azure.com/ndwnu/NLS/_git/nls-springboot) ([source](https://dev.azure.com/ndwnu/NLS/_git/nls-springboot)) | test | patch | `8.0.1` -> `8.0.2` |
| [com.google.guava:guava](https://github.com/google/guava) | compile | minor | `33.3.1-jre` -> `33.4.0-jre` |
| [org.springframework.boot:spring-boot-starter-parent](https://spring.io/projects/spring-boot) ([source](https://github.com/spring-projects/spring-boot)) | parent | patch | `3.4.0` -> `3.4.1` |

---

### Release Notes

<details>
<summary>spring-projects/spring-boot (org.springframework.boot:spring-boot-starter-parent)</summary>

### [`v3.4.1`](https://github.com/spring-projects/spring-boot/releases/tag/v3.4.1)

[Compare Source](spring-projects/spring-boot@v3.4.0...v3.4.1)

##### 🐞 Bug Fixes

-   KafkaProperties fail to build SSL properties when the bundle name is an empty string [#&#8203;43563](spring-projects/spring-boot#43563)
-   Diagnostics are poor when property resolution throws a ConversionFailedException [#&#8203;43559](spring-projects/spring-boot#43559)
-   SpringApplicationShutdownHandlers do not run in deterministic order [#&#8203;43536](spring-projects/spring-boot#43536)
-   Unable to find a `@SpringBootConfiguration` results in misleading error message [#&#8203;43507](spring-projects/spring-boot#43507)
-   With multiple ResourceHandlerRegistrationCustomizer beans in the context, only one of them is used [#&#8203;43497](spring-projects/spring-boot#43497)
-   Unable to use Docker Compose support when mixing dedicated and shared services [#&#8203;43472](spring-projects/spring-boot#43472)
-   Kafka dependency management does not include the kafka-server module [#&#8203;43454](spring-projects/spring-boot#43454)
-   Docker API version is incorrectly reported when '/\_ping\` calls fail and version should be fixed [#&#8203;43452](spring-projects/spring-boot#43452)
-   Methods to build producer / consumer properties from KafkaProperties are inconvienenent to use without an SSL bundle [#&#8203;43448](spring-projects/spring-boot#43448)
-   Failures in -Djarmode=tools do not consistently return a non-zero exit [#&#8203;43436](spring-projects/spring-boot#43436)
-   HttpComponentsClientHttpRequestFactoryBuilder replaces the existing defaultRequestConfigCustomizer rather than adding to it [#&#8203;43429](spring-projects/spring-boot#43429)
-   spring-boot-maven-plugin sets imagePlatform even if it's empty [#&#8203;43424](spring-projects/spring-boot#43424)
-   OnBeanCondition fails to match on annotations when using Scoped ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants