1611 Commits

Author SHA1 Message Date
Leo Li
9de9983e25 Fix @deprecated and @see in Archive's javadoc
See gh-28677
2021-11-15 12:07:22 +00:00
Andy Wilkinson
2cec3971d7 Prohibit unwanted dependencies in all modules not just starters
Closes gh-28658
2021-11-12 20:04:35 +00:00
Stephane Nicoll
188278ae4a Polish "Fix typo"
See gh-28548
2021-11-08 08:29:11 +01:00
slowjoe007
5a121197fc Fix typo
See gh-28548
2021-11-08 08:28:28 +01:00
Stephane Nicoll
1b3f52d609 Harmonize line endings
See gh-27615
2021-10-28 15:22:57 +02:00
Andy Wilkinson
72f80f3ae6 Upgrade to Testcontainers 1.16.1
Closes gh-28468
2021-10-28 13:06:41 +01:00
Phillip Webb
2f6651c3cb Don't use markdown syntax in javadoc or error messages
Closes gh-28408
2021-10-21 11:24:54 -07:00
Phillip Webb
7388f2b60b Attempt to reduce JarFileWrapper heap consumption
Update `JarURLConnection` to use a single shared wrapper per
jar file rather than creating a new one each time. This update
should help to reduce GC pressure.

Fixes gh-28042
2021-10-14 21:48:01 -07:00
Andy Wilkinson
c5d45585d9 Remove unnecessary overrides of finalize
Closes gh-28209
2021-10-08 12:39:00 +01:00
Andy Wilkinson
9c9fbf400e Upgrade to Spring Java Format 0.0.29
Closes gh-28205
2021-10-06 09:52:45 +01:00
Andy Wilkinson
b7a2a2d5e0 Set last access and last modified times in layertools extract
Closes gh-28167
2021-10-04 10:17:11 +01:00
Andy Wilkinson
5957dfeea4 Don't include binary jars in loader-tools source jar
Closes gh-28113
2021-09-23 13:23:29 +01:00
Phillip Webb
ec12d51f30 Polish 2021-09-21 14:00:28 -07:00
Phillip Webb
dfd36673f7 Update copyright year of changed files 2021-09-21 11:17:19 -07:00
Phillip Webb
cfeafee826 Polish 2021-09-21 11:16:46 -07:00
Scott Frederick
c8ff874e91 Add builderFor label to ephemeral builder image
Adding a label to the ephemeral builder image cloned from the base
builder image eliminates contention between builds that are run
concurrently. Without this label, concurrent builds could result in
a race condition in the Docker daemon if the ephemeral builder image
shared by builds was deleted by both builds at exactly the same time.

Fixes gh-27888
2021-09-14 15:22:23 -05:00
Andy Wilkinson
273600bcdd Retain distinction between compile and runtime deps of optional deps
Previously, the optional configuration was added to the compile and
runtime classpaths of each source set and the the javadoc classpath
as well. This had a few disadvantages, the most notable of which is
that it meant that the configuration was ifrst resolved and then
the outcome of the resolution was added to the compile and runtime
classpaths. As a result, none of the attributes on the compile and
runtime classpaths were considered to influence variant selection.

This commit reworks the optional dependencies plugin so that the
compile and runtime classpaths of each source set are now configured
to extend from the optional configuration. This allows each
classpath configuration's attributes to influence the dependencies
that are selected from the optional configuration during resolution.
For example, when resolving the compile classpath, compile
dependencies (Usage.JAVA_API) will be selected and when resolving the
runtime classpath, runtime dependencies (Usage.JAVA_RUNTIME) will be
selected.

The above-described change means that runtime dependencies of an
optional dependencies will no longer leak into the compile classpath.
As a result of this, our Gradle plugin's test infrastructure has
been updated so that it no longer references runtime dependencies of
the Kotlin Gradle plugin at compile time.

Closes gh-27965
2021-09-13 10:47:14 +01:00
Andy Wilkinson
47163af9b6 Fix handling of Zip64 jar files larger than 4,294,967,295 bytes
Previously, a Zip64 jar file was identified by the number of entries
in the central directory being 0xFFFF. This value indicates that
there the number of entries is too big for the 2-byte field. However,
a jar may be in Zip64 format due to it exceeding the Zip format's
maximum size rather than its maximum number of entries so this field
cannot be used as a reliable indicator. The Zip specification doesn't
require any of the fields of the end of central directory record to
have a value of 0xFFFF (2-byte fields) or 0xFFFFFFFF (4-byte fields)
when using Zip64 format so we need to take a different approach.

Additionally, a number of places in the code assumed that an entry's
offset would always be available from the central directory file
header directly. This assumption did not hold true when the jar was
a Zip64 archive due to its size as the offset's value would be
0xFFFFFFF indicating that it should be read from the Zip64 extended
information field within the header's extra field instead.

This commit updates the Zip64 detection to look for the Zip64 end of
central directory locator instead. If present, it begins 20 bytes
before the beginning of the end of central directory record. Its
first four bytes are always 0x07064b50. The code that reads the
local header offset has also been updated to refer to the Zip64
extended information field when the offset is too large to fit in
the 4-byte field in the central directory file header. To allow
greater-than-4-byte offsets to be handled, a number of fields,
method parameters, and local variables have had their type changed
from an int to a long.

Fixes gh-27822
2021-09-09 09:17:48 +01:00
Andy Wilkinson
93ac6455d3 Document that starter parent enables compilation with -parameters
Closes gh-27762
2021-09-07 16:57:56 +01:00
Andy Wilkinson
ffbd28b60a Polish "Polish access modifiers for test classes"
See gh-27736
2021-08-18 17:52:42 +01:00
izeye
8a425dedfd Polish access modifiers for test classes
See gh-27736
2021-08-18 17:38:40 +01:00
Andy Wilkinson
29f5570208 Stop s-b-configuration-metadata leaking enforced constraints
Fixes gh-27726
2021-08-17 15:34:29 +01:00
Andy Wilkinson
d4d1ca007e Mention productionRuntimeClasspath in the docs
Closes gh-27558
2021-08-10 10:44:57 +01:00
izeye
9f44cefc56 Use deprecated mainClassName in Gradle test
See gh-27537
2021-08-04 09:23:52 +02:00
Scott Frederick
5d793afcb5 Prevent hanging when deleting Docker builder container after exception
An exception being thrown while the Maven plugin is uploading the app
archive bits to an ephemeral builder container would leave the
interaction with the Docker daemon in a state that caused further
interaction with the daemon (such as deleting the ephemeral builder)
to hang indefinitely. This commit cleans up the connection on an
exception to prevent this condition.

Fixes gh-27515
2021-07-30 13:41:40 -05:00
Andy Wilkinson
ad2d9c0ab1 Customize Cassandra's configuration to reduce container startup time
Closes gh-27524
2021-07-29 17:33:56 +01:00
Andy Wilkinson
5d9da7206e Limit use of deprecated mainClassName in Gradle plugin tests
Closes gh-27320
2021-07-26 15:21:44 +01:00
Phillip Webb
a76e5c043e Update copyright year of changed files 2021-06-23 21:01:45 -07:00
Phillip Webb
63ed921554 Restore simple Library constructor
See gh-15808
2021-06-23 17:27:26 -07:00
Madhura Bhave
b790c82732 Apply exclusions to existing war entries
Update `RepackageMojo` and supporting classes so that `exclusions`
on the repackage goal apply to both the contributed libraries and any
existing jar entries already contained in the original war.

Prior to this commit, exclusions would apply to contributed jars (for
example, those in `WEB-INF/lib-provided`) but not jars that were
packaged directly into `WEB-INF/lib` by the war plugin

Fixes gh-15808

Co-authored-by: Phillip Webb <pwebb@vmware.com>
2021-06-23 15:08:31 -07:00
Andy Wilkinson
e18eb08222 Fix additional metadata locations with config cache
Previously, a project with a dependency on Spring Boot's configuration
processor would fail to build when the configuration cache is enabled
due to it accessing the Project during task execution.

Instead of accessing the project during task execution, this commit
updates the code to retrieve the resource locations from the matching
source set in advance. The locations are then stored in the action
that configures the compile task when needed.

Closes gh-26880
2021-06-21 14:31:04 +01:00
Andy Wilkinson
cd808d2f18 Only get Kotlin plugin's version once we know we need it
Fixes gh-26946
2021-06-17 17:27:03 +01:00
Andy Wilkinson
16bfa669e1 Polish authors separators 2021-06-14 13:35:30 +01:00
Andy Wilkinson
f6b7730dac Use Asciidoctor's revision line to provide document's version
Using the revision line means that the revision number is automatically
set. The revision number is then included by the HTML and PDF backends
in the standard location. In the HTML backend that's alongside the
list of authors. In the PDF backend that's on the title page.

Closes gh-26851
2021-06-14 13:24:01 +01:00
Andy Wilkinson
a1c5fcca58 Move common Asciidoctor configuration into our conventions
Closes gh-26620
2021-06-09 18:00:45 +01:00
Phillip Webb
4d62e47c5d Merge branch '2.3.x' into 2.4.x 2021-06-08 18:05:12 -07:00
Phillip Webb
9e1c78da99 Update copyright year of changed files 2021-06-08 18:03:46 -07:00
Stephane Nicoll
ad99aa2f4a Merge branch '2.3.x' into 2.4.x
Closes gh-26747
2021-06-03 09:26:38 +02:00
dreis2211
f470151535 Remove reference to surefirebooter JAR
See gh-26737
2021-06-03 09:24:56 +02:00
Phillip Webb
1cda557d03 Merge branch '2.3.x' into 2.4.x
Closes gh-26743
2021-06-02 17:25:51 -07:00
Phillip Webb
1beee5700c Don't close early when SecurityManager present
Update `JarFile` and `JarFileWrapper` classes so that they no longer
close the `JarFile` early if a `SecurityManager` is in use.

Prior to this commit, the closed `JarFile` would cause (an ultimately
swallowed) NPE in `ZipFile` which manifested itself as a
`ClassNotFoundException` when starting the app.

Closes gh-25538
2021-06-02 17:24:05 -07:00
Phillip Webb
49d3ecc2b2 Merge branch '2.3.x' into 2.4.x
Closes gh-26702
2021-05-28 14:53:12 -07:00
Phillip Webb
617f7b9587 Improve ImageName/ImageReference parse performance
Update `ImageName` and `ImageReference` to use distinct regex patterns
to parse specific parts of the value. Prior to this commit a single
regex pattern was used which could hang given certain input strings.

Fixes gh-23115
2021-05-28 14:52:27 -07:00
Phillip Webb
49c30854af Rename PRODUCTION_RUNTIME_CLASSPATH_NAME
Rename the now public constant for consistency with the JavaPlugin.

See gh-26686
2021-05-27 13:14:16 -07:00
Phillip Webb
1e0ae9d5e3 Make PRODUCTION_RUNTIME_CLASSPATH_NAME public
Change `SpringBootPlugin.PRODUCTION_RUNTIME_CLASSPATH_NAME` from package
private to public so that it can be accessed in user build scripts.

Fixes gh-26686
2021-05-27 12:07:35 -07:00
Stephane Nicoll
942691753d Merge branch '2.3.x' into 2.4.x
Closes gh-26645
2021-05-24 11:39:38 +02:00
dreis2211
01ee6190a2 Remove workaround for SUREFIRE-1679
See gh-26632
2021-05-24 11:15:58 +02:00
Stephane Nicoll
ef093bc9c6 Merge branch '2.3.x' into 2.4.x
Closes gh-26570
2021-05-17 14:24:03 +02:00
Stephane Nicoll
306b6f6999 Configure SessionCookieConfig in MockServletWebServer
Closes gh-26479
2021-05-17 14:05:45 +02:00
Andy Wilkinson
970f933806 Merge branch '2.3.x' into 2.4.x
Closes gh-26450
2021-05-13 11:44:01 +01:00