Replace explicit casts with pattern variables to improve readability and
remove redundancy.
See gh-48297
Signed-off-by: geopark021 <geobrown021@gmail.com>
Update `DockerApi` and `Builder` to support export of images with a
specified platform. This prevents 'NotFound: content digest sha256:'
errors when building an amd64 image on an arm64 machine.
Fixes gh-46665
Update `DockerApi` so that the URL uses version `v1.50` whenever
possible. Prior to this commit, `v1.24` was often used which breaks
recent Docker installs due to the dropping of API version v1.43 and
below.
If the actual API version running is less than `v1.50`, but greater
than the minimum required for the API call, it will be used instead.
This hopefully means that older versions of Docker will continue to
work as they did previously.
Fixes gh-48050
Prior to this commit, performing a build on a ARM Mac with the default
configuration and then building it again with the image platform set to
`linux/amd64` results in an "Image platform mismatch detected" failure.
This is due to the fact that `docker inspect` returns JSON for the
default platform, regardless of the fact that another architecture
has been pulled.
To solve the issue, the `inspect` API call on Docker 1.49+ can now
accept a platform query parameter which when specified returns platform
specific JSON.
At the time of this commit, the Docker API documentation hasn't been
updated, despite PR https://github.com/moby/moby/pull/49586 being
merged.
In addition to using the correct inspect JSON, we also need to pin
the run image we use to a specific digest. Without doing this,
buildpacks revert back to the default platform image and
"content digest not found" errors are thrown (similar to
https://github.com/buildpacks/docs/issues/818).
See gh-47292
Signed-off-by: hojooo <ghwn5833@gmail.com>
Update code and documentation to use the correct Paketo base image of
`ubuntu-noble-run` rather than `ubuntu-noble-run-base` which was
published only for testing purposes.
Closes gh-47966
Refine error handling logic so that HTTP 407 (Proxy Authentication
Required) responses from the Docker daemon are treated as plain
text rather than JSON.
See gh-47180
Signed-off-by: Siva Sai Udayagiri <udayagirishivasai@gmail.com>
This commit renames the annotations and other signals that the
annotation processor uses to process configuration metadata. By adding
a `Test` prefix, this prevents the confusion with the real annotation.
Closes gh-47468
Update Maven plugin with `<includeOptional>` configuration property that
can be used to toggle if optional dependencies are packages.
For back-compatibility, in 3.5.x the default is `true`.
Fixes gh-25403
The examples for overriding a managed dependency version with Maven
were using an outdated version property. This commit updates the
example to use a valid property.
The version override warning from the Gradle plugin docs was also
copied to the Maven docs.
See gh-47304
Signed-off-by: Scott Frederick <scottyfred@gmail.com>
Before this commit, system properties with a value has been quoted all the time.
This is fine as long if the resulting string is passed into the RunArguments(String) constructor, which then parses it again into a String[].
This isn't fine if they are added to ProcessBuilder.command, because then quoting is unnecessary.
This commit also fixes the unnecessary Map -> String -> String[] parsing by adding the entries directly into the array.
Closes gh-46555
Previously, available() would return 0 initially and then negative
values once some data head been read. It should be a positive value
(for entries with content) initially a decrease as data is read
reaching zero once an entry's data has been read in its entirety.
This commit initialises the count of the remaining bytes to
be equal to the entry's uncompressed size. It also removes logic
that closes the stream when remaining equals zero upon read or skip.
This condition was not reached before as remaining would become
negative as soon as any data was read or skipped. With the correct
initialization of remaining, the condition is now reached and it
results in test failures due to premature closure. Furthermore, the
javadoc of read and skip do not require the stream to be closed
when the reach end of file.
Closes gh-47056
Gradle 9.1 will deprecate support for declaring dependencies using
a map. To adapt to this, a handful of tests have been updated to
use single-string notation instead.
Closes gh-46902
This is a follow-up of gh-46599 where detecting the default value
suffer from the same problem. Rather than using a name, the resolver now
provides the field itself. This also adds a dedicated test for the use
of @Name with Lombok.
Closes gh-46662
Previously, when a property was customized with @Name, getter, setter,
field, and record component were looked up using the custom name, rather
than the property name. This lead to missing information as the custom
name is not meant to match the field name, for instance.
This commit keeps the custom name, but uses the property name as for
other cases.
See gh-46599
Signed-off-by: Bohdan Pryshedko <prishedko@gmail.com>