2631 Commits

Author SHA1 Message Date
Phillip Webb
430c6b7e9f Downgrade to SLF4J 1.7 for spring-boot-gradle-plugin tests
The downgrade is required for tests to run in Eclipse.

Closes gh-32626
2022-10-14 11:58:16 -07:00
Scott Frederick
3ea18f07fa Polish "Use NBT plugin version from gradle.properties in image tests"
See gh-32643
2022-10-13 15:05:06 -05:00
Phillip Webb
7e8ed075c0 Merge branch '2.7.x'
Closes gh-32682
2022-10-11 23:21:52 -07:00
Phillip Webb
ed01a77a99 Merge branch '2.6.x' into 2.7.x
Closes gh-32681
2022-10-11 23:19:34 -07:00
Phillip Webb
e0c79ce598 Support PEM formatted elliptic-curve TLS keys
Update `PrivateKeyParser` to support loading PEM formatted
elliptic-curve keys. We need to do a similar trick to the PKCS1 keys
and convert them to a `PKCS8EncodedKeySpec`.

Fixes gh-32646
2022-10-11 23:18:44 -07:00
Andy Wilkinson
3ca5c7ff5b Create AOT source sets as soon as the Java plugin is applied
Previously, the AOT source sets were not created until both the
Java and Spring Boot plugins had been applied. This could create
ordering problems when the Spring Boot plugin's native image plugin
action tried to access the AOT source sets to configure the
classpaths of the nativeCompile and nativeTest tasks. If the
plugins were applied in a particular order the AOT source sets
would not exist and a failure would occur.

This commit updates the Spring Boot AOT plugin to create the source
sets as soon as the Java plugin has been applied. This ensure that
they're in place when reacting to the native image plugin being
applied.

Closes gh-32661
2022-10-11 19:58:03 +01:00
Andy Wilkinson
808e0be552 Merge branch '2.7.x'
Closes gh-32679
2022-10-11 19:16:08 +01:00
Andy Wilkinson
1b604e30f7 Merge branch '2.6.x' into 2.7.x
Closes gh-32678
2022-10-11 19:15:33 +01:00
Andy Wilkinson
215eb96355 Improve error handling in SpringBootPlugin
Closes gh-32677
2022-10-11 19:15:23 +01:00
Andy Wilkinson
d351086a06 Adapt to breaking changes to AOT processing entry points
See gh-32550
2022-10-10 22:02:25 +01:00
Andy Wilkinson
0e23fbe30b Use Neo4j 4.4.11 for integration testing
See gh-32620
2022-10-06 19:53:46 +01:00
Andy Wilkinson
188cac6540 Protect against null run process customizer
See 0ee277b8c3f3dc92e480c9b71169d54ef9b4c0f9
See gh-32607
2022-10-06 11:55:41 +01:00
Andy Wilkinson
0ee277b8c3 Ensure that run mojo's child process is killed when Maven is killed
Fixes gh-32607
2022-10-06 10:19:22 +01:00
Stephane Nicoll
44c843145a Add support for specifying application arguments
This commit makes sure that application arguments can be provided when
optimizing an application at build-time. It uses the same mechanism of
the regular run goal, merging the profile property if set.

Closes gh-32579
2022-10-05 16:36:38 +02:00
Stephane Nicoll
39cf17ed81 Add missing integration test for profile management in process-aot 2022-10-05 16:22:44 +02:00
Phillip Webb
e0b67889a8 Use Stream.toList instead of Stream.collect when possible
Update code to make use of `Stream.toList()` whenever possible.

Closes gh-28177
2022-10-04 00:29:22 -07:00
Scott Frederick
d25a99692f Replace Spring Boot TestCompiler with Spring Framework's version
See gh-31266
2022-09-30 15:58:11 -05:00
Stephane Nicoll
e2dd0ef9a4 Adapt AotProcessor to changes in Spring Framework
Closes gh-32560
2022-09-30 16:47:03 +02:00
Andy Wilkinson
51df7813a5 Remove code deprecated in 2.x and add since and forRemoval attributes
Closes gh-32548
Closes gh-32549
2022-09-30 14:39:05 +01:00
dreis2211
65ef8fc51a Use ByteArrayOutputStream.toString where possible
See gh-32534
2022-09-29 15:03:24 +02:00
Andy Wilkinson
17953eeb33 Merge branch '2.7.x'
Closes gh-32544
2022-09-29 11:41:15 +01:00
Andy Wilkinson
3ef633b096 Merge branch '2.6.x' into 2.7.x
Closes gh-32543
2022-09-29 11:39:42 +01:00
Andy Wilkinson
84a25c7dcf Configure Log4j2 classpath overrides consistently
Closes gh-32537
2022-09-29 11:25:21 +01:00
dreis2211
f0b4a65546 Avoid usage of StringBuffer where possible
See gh-32519
2022-09-29 09:29:10 +02:00
Andy Wilkinson
0bfa9cd704 Upgrade to Logback 1.4 and SLF4J 2.0
Closes gh-12649
2022-09-28 21:14:08 +01:00
Andy Wilkinson
0f44e69995 Merge branch '2.7.x'
Closes gh-32500
2022-09-26 13:15:39 +01:00
Andy Wilkinson
5124ae94ae Merge branch '2.6.x' into 2.7.x
Closes gh-32499
2022-09-26 13:15:11 +01:00
Andy Wilkinson
cfac7f55a4 Correct annotations on BootBuildImage's file-based inputs
Closes gh-32495
2022-09-26 13:13:16 +01:00
Andy Wilkinson
f67db3d9ad Move spring-boot-cli into spring-boot-tools
Closes gh-32492
2022-09-23 16:44:57 +01:00
Andy Wilkinson
4a05230d5d Move spring-boot-properties-migrator into spring-boot-tools
Closes gh-32491
2022-09-23 16:18:30 +01:00
Madhura Bhave
afce559050 Remove unused dependency from Maven integration test 2022-09-22 14:07:26 -07:00
Andy Wilkinson
7c7c34cda1 Fix classpath roots of AOT test processing
This was regressed in 6175c4210dca82776ad26ab140a0ae19704c9fe6 so that
each class on the classpath was passed in as a "root". This commit
corrects this so that only the roots are passed to the AOT test
processor.

See gh-32424
2022-09-22 12:30:43 +01:00
Scott Frederick
f9c341c75a Revert "Generate the AutoConfiguration.imports file from annotations"
This reverts commit da4de7d67d442771704fba268f33fbc90aaaf1aa.
2022-09-21 14:50:15 -05:00
Scott Frederick
d62d7ca75d Revert "Generate ManagementContextConfiguration.imports file from annotations"
This reverts commit 6b3b0dd3a6ac4818388e97e121de69a91e21657d.
2022-09-21 14:50:15 -05:00
Scott Frederick
1f53eb7df9 Revert "Sort the contents of generated imports files"
This reverts commit 95e62b7ff822d0179850b3eb9baf6f0e0d89eb2e.
2022-09-21 14:50:15 -05:00
Scott Frederick
910e9c9fcc Revert "Fix windows build"
This reverts commit 9fe24fe6929099243ab8aecceeed88ed48b24860.
2022-09-21 14:50:15 -05:00
Andy Wilkinson
4a80b36160 Configure native image classpath outside of task realisation
Closes gh-32465
2022-09-21 18:14:46 +01:00
Andy Wilkinson
6175c4210d Fix skipping of processAot when there is no main source
See gh-32424
2022-09-21 14:57:54 +01:00
Andy Wilkinson
fa81e8ca79 Skip processAot and processTestAot if there is no main or test code
Closes gh-32424
2022-09-20 17:15:19 +01:00
Andy Wilkinson
e8aa5680d6 Support file-based reachability metadata repositories
See gh-32408
2022-09-20 14:06:18 +01:00
Andy Wilkinson
8323f24ccc Make classes generated by AOT test processing available to nativeTest
Closes gh-32428
2022-09-20 11:29:18 +01:00
Scott Frederick
1ed4d89466 Copy native reachability metadata to jar file in Gradle plugin
When the Spring Boot Gradle plugin builds a fat jar and the Native
Build Tools Gradle plugin is applied to the build, any configuration
files from the GraalVM reachability metadata repository that match
project dependencies are copied to a `META-INF/native-image`
directory in the fat jar.

Closes gh-32408
2022-09-16 12:26:24 -05:00
Andy Wilkinson
2b503ee334 Add AOT-generated classes as a dependency
Previously, the AOT-generated classes were added directly to the
compile classpath of the AOT compilation task. This didn't work
perfectly in IntelliJ IDEA, leaving the generated classes in the
runtime scope and causing compilation problems where the
AOT-generated source tried to reference those classes.

This commit updates the plugin to add the AOT-generated classes as
a dependency to the AOT source set's implementation configuration.
This makes the classes available during compilation by the source
set's Java compilation task while also makeing IntelliJ IDEA aware
of their presence on the compile classpath.

Closes gh-32395
2022-09-15 14:02:54 +01:00
Phillip Webb
20b91c5ae2 Include 'classesDirectory' in ProcessTestAotMojo classpath
Update `ProcessTestAotMojo` so that the classesDirectory and
the testClassesDirectory are on the classpath when compiling
code.

See gh-32191
2022-09-14 13:50:27 -07:00
Stephane Nicoll
88f2b33cc1 Add AOT-generated classes to classpath of the compiler
See gh-32304
2022-09-13 14:58:16 +02:00
Andy Wilkinson
867c49337a Add AOT-generated classes to classpath of AOT JavaCompile tasks
See gh-32304
2022-09-13 13:03:24 +01:00
Stephane Nicoll
9fe24fe692 Fix windows build
This commit makes sure that files that are generated in a temporary
directory are closed once the related test completes.
2022-09-10 16:24:29 +02:00
Andy Wilkinson
aafceb3868 Merge branch '2.7.x'
Closes gh-32285
2022-09-09 16:47:06 +01:00
Andy Wilkinson
f17df7bf30 Merge branch '2.6.x' into 2.7.x
Closes gh-32284
2022-09-09 16:46:43 +01:00
Andy Wilkinson
23c2f73b3f Update tests to allow them to run on Java 19
Closes gh-32280
2022-09-09 16:46:14 +01:00