863 Commits

Author SHA1 Message Date
Stephane Nicoll
0533ac58fb Test the Gradle plugin against 6.7.1
Closes gh-24449
2020-12-10 15:33:37 +01:00
Phillip Webb
837fc83527 Fix checkstyle header violations
See gh-24337
2020-12-04 18:05:53 -08:00
Andy Wilkinson
31042bfc49 Test inclusion of system scope dependencies in repackaged war
Closes gh-22503
2020-11-10 17:35:04 +00:00
Stephane Nicoll
59ea7c11f6 Use most specific getter when generating metadata
This commit makes sure to use the most specific getter if more than
one candidate exists.

Closes gh-24002
2020-11-05 16:01:28 +01:00
Andy Wilkinson
e7eb7739dc Use overriding rather than overridden getter methods in config prop AP
Fixes gh-23966
2020-10-29 15:30:46 +00:00
Phillip Webb
cf09451ffb Retain inner-class data on incremental compile
Ensure that metadata sourced from inner-types is not deleted when
performing an incremental compile. Prior to this commit, the source
type was searched using the `Outer$Inner` format. This is not supported
`Elements.getTypeElement` so we now convert the names to `Outer.Inner`.

Closes gh-10886
2020-10-28 21:13:08 -07:00
Stephane Nicoll
93e36a97ab Remove version elements from Maven plugin documentation
This commit removes `<version>` from the Maven Plugin documentation
where it makes sense so that versions aren't hardcoded unnecessarily.

Rather, a plugin or dependency management should be in place so those
are not needed.

Closes gh-23909
2020-10-28 13:39:03 +01:00
Stephane Nicoll
a3818d690e Fix custom layout example so that tokens are replaced 2020-10-28 13:37:59 +01:00
Andy Wilkinson
7ac14203ab Expand Gradle plugin's docs on setting bootRun's system properties
Closes gh-23578
2020-10-06 14:35:30 +01:00
Andy Wilkinson
e74f777971 Remove use of spring-core's Assert from PropertiesLauncher
Fixes gh-23474
2020-09-26 09:11:05 +01:00
dreis2211
fba1fb23e4 Fix multi-release JAR test on JDK 15
Backport of 54f93e9

See gh-23445
2020-09-22 10:09:18 +02:00
Phillip Webb
4945806d84 Make StringSequence.isEmpty() public
Make `StringSequence.isEmpty()` public for compatibility with JDK 15.

Closes gh-23440
2020-09-21 22:26:20 -07:00
Andy Wilkinson
581190d7a0 Test the Gradle plugin against 6.7-rc-1
Closes gh-23425
2020-09-21 12:14:35 +01:00
Andy Wilkinson
360e29af48 Polish "Add note about Kotlin main class name"
See gh-23418
2020-09-21 10:40:29 +01:00
Sebastiaan Fernandez
0bde5fda9b Add note about Kotlin main class name
See gh-23418
2020-09-21 10:36:16 +01:00
Andy Wilkinson
5ec673ff2a Add anchors to section headers in Gradle plugin docs
Fixes gh-23402
2020-09-18 09:06:54 +01:00
Phillip Webb
195def0ec3 Merge branch '2.1.x' into 2.2.x 2020-09-15 08:48:00 -07:00
Phillip Webb
e0030094e2 Fix missing jar entry certificates
Ensure that the source jar entry is closed before reading
certificates and code signers from the entry.

gh-19041
2020-09-15 08:42:58 -07:00
Phillip Webb
b8e6b2ef94 Merge branch '2.1.x' into 2.2.x 2020-09-14 13:51:24 -07:00
Phillip Webb
4138e59c33 Fix potential JarFileEntries ClassCastException
Update `JarFileEntries` so that the interface is obtained rather than
the concrete implementation. This allows `JarEntry` values to be used
without causing a ClassCastException.

Closes gh-19041
2020-09-14 13:48:59 -07:00
Phillip Webb
a20fdf8e6a Merge branch '2.1.x' into 2.2.x
Closes gh-23263
2020-09-13 22:45:39 -07:00
Phillip Webb
895ff9c72d Merge pull request #19041 from mathieufortin01
* pr/19041:
  Polish 'Fix signed jar performance issues'
  Fix signed jar performance issues
  Ignore Visual Studio Code Files

Closes gh-19041
2020-09-13 22:40:05 -07:00
Phillip Webb
c6a9696dd1 Polish 'Fix signed jar performance issues'
Update the performance improvements to push certificate loading
and storage into the `JarFileEntries` class. This allows us to
keep certificates without needing to cache all entry data. We
now also keep certificates and code signers in a dedicated class
which is set whenever the full jar stream as been read, even if
the contained values are `null`. The logic that assumes META-INF
entries are not signed has been removed in favor of delegating to
the streamed entry results.

See gh-19041
2020-09-13 22:28:45 -07:00
mathieufortin01
4d053e15d8 Fix signed jar performance issues
Update Spring Boot nested JarFile support to improve the performance of
signed jars. Prior to this commit, `certificates` and `codeSigners`
were read by streaming the entire jar whenever the existing values
were `null`. Unfortunately, the contract for `getCertificates` and
get `getCodeSigners` states that `null` is a valid return value. This
meant that full jar streaming would occur whenever either method was
called on an entry that had no result. The problem was further
exacerbated by the fact that entries might not be cached.

See gh-19041
2020-09-13 22:14:03 -07:00
Andy Wilkinson
b57b2f0b44 Test the Gradle Plugin against 6.5 and 6.6
Closes gh-23075
2020-08-25 12:01:25 +01:00
Phillip Webb
17e2d72bcb Fix Windows path issue in JarFileWrapperTests
See gh-22991
2020-08-19 10:33:23 -07:00
Phillip Webb
3fe2005e06 Use @AfterEach to close the source jar file
Update `JarFileWrapperTests` so that the jar files are closed after each
test.

See gh-22991
2020-08-19 10:22:10 -07:00
Phillip Webb
2a137a2d8a Remove Mockito from JarFileWrapperTests
Remove Mockto from JarFileWrapperTests since it seems to be failing on
later versions of Java.

See gh-22991
2020-08-18 16:20:05 -07:00
Phillip Webb
4e76138ebc Update copyright year of changed files 2020-08-18 15:37:59 -07:00
Phillip Webb
5997cbd21f Refine AbstractJarFile method visibility
Refine method visibility in an attempt to fix test issues on Java 11+.

See gh-22991
2020-08-18 15:37:37 -07:00
Phillip Webb
aac367e9c5 Attempt to fix memory leak in JarFile class
Create a new `JarFileWrapper` class so that we can wrap and existing
`JarFile` and offer a version that can be safely closed.

Prior to this commit, we provided wrapper functionality in the `JarFile`
class itself. Unfortunately, because we override `close` and also create
a lot of wrappers this caused memory issues when running on Java 11.

With Java 11 `java.util.zip.ZipFile` class uses `FinalizableResource`
for any implementation that overrides `close()`. This means that any
wrapper classes will not be garbage collected until the JVM finalizer
thread runs.

Closes gh-22991
2020-08-18 14:07:03 -07:00
Phillip Webb
fdd6a89a61 Polish 2020-08-06 10:14:01 -07:00
Andy Wilkinson
07699ea6ff Retry when dependency resolution fails in ModifiedClassPathClassLoader
Closes gh-22763
2020-08-06 15:12:20 +01:00
Andy Wilkinson
1a43cd1c8e Merge branch '2.1.x' into 2.2.x
Closes gh-22551
2020-07-24 14:28:11 +01:00
Nelson Osacky
0494007893 Disable extra scans for full profile.
The extra scans were not disabled for the full profile, only the
regular profile.

See gh-22550
2020-07-24 14:27:32 +01:00
Andy Wilkinson
f4508b4059 Merge branch '2.1.x' into 2.2.x
Closes gh-22547
2020-07-24 11:54:12 +01:00
Nelson Osacky
e41a53cf85 Add Gradle Enterprise Extension
This adds build caching and build scans.

The changes required disabling scans when using the maven invoker
plugin in order to not cause duplicate build scans when invoking other
maven builds. There is also an empty `.mvn` folder in the
spring-boot-starters project to prevent duplicate build scans as well
since there is no way to pass properties to the maven-javadoc-plugin.

The checkstyle plugin was causing a cache miss with the
`propertyExpansion` because it contains an absolute path. The absolute
path is now ignored and instead the files are added as inputs to the
checkstyle plugin. This only enables the local build cache. The remote
cache is not yet enabled.

On my local machine:

./mvnw clean install build times go from about 30 minutes to about 10 minutes.
./mvnw clean install -Pfull build times go from about 60 minutes to about 13 minutes.

See gh-22089
2020-07-24 11:47:24 +01:00
Andy Wilkinson
21f733b89b Merge branch '2.1.x' into 2.2.x
Closes gh-22409
2020-07-20 13:49:53 +01:00
Andy Wilkinson
179d2c79d6 Avoid trivialising what the reader's learning about
Closes gh-22408
2020-07-20 13:45:41 +01:00
Andy Wilkinson
a0f1424393 Polish "Fix unwrapping of captured PrintStream in test support's OutputCapture"
See gh-22214
2020-07-07 09:54:52 +01:00
XenoAmess
75a64bd901 Fix unwrapping of captured PrintStream in test support's OutputCapture
See gh-22214
2020-07-07 09:53:34 +01:00
Phillip Webb
3b3a49db1f Polish 'Fix infinite loop in FieldValues'
See gh-22040
2020-06-22 12:01:04 -07:00
Konrado85
39a853c57b Fix infinite loop in FieldValues
Update `FieldValues` test object so that it doesn't cause an infinite
loop if it is actually created.

See gh-22040
2020-06-22 11:58:22 -07:00
Madhura Bhave
36faa1d42a Document using system properties in gradle plugin docs
Closes gh-21317
2020-06-09 16:07:54 -07:00
Andy Wilkinson
020a47ba3e Document support for Gradle 5
Closes gh-15358
2020-06-08 14:29:07 +01:00
Phillip Webb
0a05b4c9fd Update copyright year of changed files 2020-06-05 15:36:09 -07:00
Andy Wilkinson
386d678d99 Use Gradle's CreateStartScripts task with 6.4 and later
Fixes gh-20759
2020-05-06 17:02:34 +01:00
Phillip Webb
50e9674631 Backport "Attempt to prevent JarFiles from being left open"
Update `JarFile` so that `super.close()` is called early so that the
file is not left open. Since we re-implement `JarFile` methods to work
directly on the underlying `RandomAccessDataFile`, it should be safe
to close immediately.

Closes gh-21177
2020-04-27 19:03:52 -07:00
Phillip Webb
7d53f7d27f Attempt to prevent JarFiles from being left open
Update `JarFile` to also call `super.close()` early for nested jars.

See gh-21126
2020-04-25 22:20:53 -07:00
Phillip Webb
7c6e912463 Attempt to prevent JarFiles from being left open
Update `JarFile` so that `super.close()` is called early so that the
file is not left open. Since we re-implement `JarFile` methods to work
directly on the underlying `RandomAccessDataFile`, it should be safe
to close immediately.

See gh-21126
2020-04-25 13:03:07 -07:00