Commit Graph

70 Commits

Author SHA1 Message Date
Stéphane Nicoll d0cdae2369 Align nativeTest to native to make it multi-modules friendly
Build and Deploy Snapshot / Build and Deploy Snapshot (push) Waiting to run Details
Build and Deploy Snapshot / Trigger Docs Build (push) Blocked by required conditions Details
Build and Deploy Snapshot / Verify (push) Blocked by required conditions Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[early-access:true toolchain:true version:24], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[early-access:true toolchain:true version:24], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:17], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:21], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:22], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:false version:22], map[id:windows-latest name:Windows]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:${{ vars.UBUNTU_MEDIUM || 'ubuntu-latest' }} name:Linux]) (push) Waiting to run Details
CI / ${{ matrix.os.name}} | Java ${{ matrix.java.version}} (map[toolchain:true version:23], map[id:windows-latest name:Windows]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:false version:17]) (push) Waiting to run Details
Run System Tests / Java ${{ matrix.java.version}} (map[toolchain:true version:21]) (push) Waiting to run Details
This commit harmonizes the behavior of the native and nativeTest Maven
profiles. Previously, enabling the nativeTest profile would
automatically add an execution of the Spring Boot and Native Build Tools
plugins, even in a module that doesn't represent an application or a
Spring Boot-related module.

With this commit, the native testing feature is only enabled if the
plugins are defined in the project, either directly, or in a parent.

The documentation has been updated as the behavior of both profiles is
now much more consistent.

Closes gh-44696
2025-03-17 11:32:35 +01:00
Andy Wilkinson 65a862c13c Merge branch '3.3.x' 2024-12-12 11:07:04 +00:00
Andy Wilkinson 8572d9e177 Restore previous Main-Class configuration
This partially reverts commit
d924e4d999.

See gh-43284
2024-12-12 11:05:58 +00:00
Andy Wilkinson 23d92aa32e Merge branch '3.3.x'
Closes gh-43291
2024-11-26 13:42:40 +00:00
Andy Wilkinson d924e4d999 Mark shaded application's jar as multi-release by default
Spring Framework now uses a multi-release jar for its virtual thread
support. If the shaded jar is not marked as being a multi-release jar
and virtual threads are enabled, the application will fail to start as
the Java 21+ virtual threads delegate will be unavailable.

This commit updates the starter parent's default configuration for the
Maven Shade plugin to set Multi-Release: true in the application's
manifest.

Closes gh-43284
2024-11-26 13:42:03 +00:00
Phillip Webb 7b3077280c Merge branch '3.3.x'
Closes gh-42441
2024-09-24 14:32:48 -07:00
Phillip Webb 100bedc07d Merge branch '3.2.x' into 3.3.x
Closes gh-42440
2024-09-24 14:29:09 -07:00
Phillip Webb ad72411e2b Apply conventions plugin to all subprojects
Closes gh-42438
2024-09-24 14:26:32 -07:00
Moritz Halbritter 9294c003b4 Remove setting BP_NATIVE_IMAGE
Closes gh-32884
2024-09-17 15:50:57 +02:00
Scott Frederick 26b59ae912 Use Paketo tiny builder by default for JVM and native apps
Closes gh-40859
2024-06-28 11:45:54 -05:00
Scott Frederick 9da2d1e089 Revert "Use Paketo tiny builder by default for JVM and native apps"
This reverts commit 6d2ebc0713.
2024-06-26 15:25:37 -05:00
Scott Frederick 6d2ebc0713 Use Paketo tiny builder by default for JVM and native apps
Closes gh-40859
2024-06-26 13:42:23 -05:00
Moritz Halbritter 0dff055c38 Apply configuration to CycloneDX plugin only for the execution
Closes gh-40927
2024-05-29 14:37:12 +02:00
Moritz Halbritter 2de9969f9a Delegate 'spring-boot.run.main-class' to 'start-class'
Closes gh-40145
2024-04-05 09:15:31 +02:00
Moritz Halbritter 4047c00aa5 Implement SBOM actuator endpoint
Closes gh-39799
2024-03-21 18:06:48 -07:00
Andy Wilkinson 53f850410f Upgrade to Git Commit ID Maven Plugin 8.0.2
Closes gh-40015
2024-03-19 10:06:13 +00:00
TheSnoozer 0fd720a87f Change dateformat for git-commit-id-maven-plugin
Old formmat: yyyy-MM-dd'T'HH:mm:ssZ, RFC 822
New format:  yyyy-MM-dd'T'HH:mm:ssXXX ISO 8601

Related to https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/674.

This change is required to make the times produced by the
git-commit-id-maven-plugin usable for Maven's reproducible builds,
see https://maven.apache.org/guides/mini/guide-reproducible-builds.html.

Timestamp for reproducible output archive entries must either formatted
as ISO 8601 or as an int representing seconds since the epoch.

Example usage might be

   <properties>
     <project.build.outputTimestamp>${git.commit.time}</project.build.outputTimestamp>
   </properties>

See gh-39606
2024-02-28 13:01:44 +01:00
Moritz Halbritter 07ee7254a6 Align to Native Build Tools metadata repository default
Closes gh-39068
2024-02-05 08:46:57 +01:00
Scott Frederick eb45aab712 Upgrade default CNB builders to Paketo Jammy
Closes gh-36689
2023-08-14 13:29:42 -05:00
Andy Wilkinson b1d26fe961 Revert "Upgrade default CNB builders to Paketo Jammy"
This reverts commit 6506208d29. The
upgrade to the Jammy builder was causing
failsWhenBuildImageIsInvokedOnMultiModuleProjectWithBuildImageGoal to
hang on CI.

See gh-36689
2023-08-07 12:10:27 +01:00
Scott Frederick 6506208d29 Upgrade default CNB builders to Paketo Jammy
Closes gh-36689
2023-08-02 19:06:16 -05:00
Scott Frederick 23ae91b008 Add native image manifest entry
A manifest entry `Spring-Boot-Native-Processed: true` is added to the
jar manifest by the Maven or Gradle plugin when the jar has been built
for use in a native image. With the Gradle plugin, this is done in
reaction to the GraalVM Native Image Plugin being applied to the
project. With the Maven plugin, this is done when the `native` profile
is applied to the build.
2023-05-02 15:11:49 -05:00
Arend v. Reinersdorff 6f97cfe7cd Remove source and target as maven.compiler.release is already set
See gh-34761
2023-04-05 15:31:25 +02:00
Martin Theiss a073ef80e8 Use maven.compiler.release to prevent impossible JDK api usage
See gh-34365
2023-03-01 09:26:54 +01:00
Stephane Nicoll 75b74637f6 Make sure the 'native' profile can be used in a multi-modules project
This commit updates the 'native' profile so that it provides plugin
management for the plugins involved in building a native image, rather
than forcing their executions.

This commit also update the Maven Plugin reference guide to describe
what the native profile does, and how it can be used in various
scenarios.

Closes gh-33184
2022-11-22 12:33:52 +01:00
Andy Wilkinson fe8644cc59 Fail more elegantly when GraalVM version is too old
Closes gh-32924
2022-11-04 13:05:22 +00:00
Stephane Nicoll f0d1eb7891 Configure the Native buildpack when enabling the native Maven profile
This commit makes sure that the Native Cloud Native Buildpacks is
configured when the native Maven profile is enabled. Doing so lets
users generate a native image with a single command-line by default:

$ ./mvnw -Pnative spring-boot:build-image

Closes gh-32764
2022-10-18 15:32:23 +02:00
Phillip Webb a8e701cee2 Provide maven configuration for add-reachability-metadata goal
Update `spring-boot-starter-parent` to execute the native build tools
`add-reachability-metadata` goal when the 'native' profile is active.

Closes gh-32736
2022-10-17 14:31:38 -07:00
Phillip Webb 9aa2854e00 Remove the execution of NBT in the native maven profile
Update `spring-boot-starter-parent` to remove the `native-compile`
execution.

Closes gh-31770
2022-10-17 14:31:38 -07:00
Stephane Nicoll bd8f53a989 Use Native Build Tools new goal name
Closes gh-32482
2022-09-23 14:51:38 +02:00
Phillip Webb d1e7c9bd70 Introduce 'nativeTest' maven profile
Update `spring-boot-start-parent` with a new `nativeTest` profile. When
active, this profile will trigger AOT processing of test code and call
the native build tools 'test' goal.

Closes gh-32383
2022-09-14 22:37:41 -07:00
Phillip Webb 09bd531fe5 Add Maven plugin support for processing test contexts Ahead-of-time
Refactor and update the Spring Boot Maven Plugin so that it can
be used to perform AOT processing of test classes.

Closes gh-32191
2022-08-30 20:41:30 -07:00
Phillip Webb 2f6354f633 Rename 'aot-generate' goal to process-aot'
See gh-31918
2022-08-25 15:02:28 -07:00
Stephane Nicoll f962f2a430 Configure NBT so that it works consistently
This commit configures the Native Build Tools plugin to use Maven's
`target/classes` rather than the default generated JAR of the project.
Previously, this would fail with the default repackage option as the
default JAR is the repackaged archive and it has a specific format that
NBT can't understand.

Closes gh-31848
2022-07-22 17:36:25 +02:00
Moritz Halbritter 3703b317ce Enable GraalVM reachability metadata repository
Closes gh-31687
2022-07-12 14:25:38 +02:00
Phillip Webb e125b0c22d Merge branch '2.7.x'
Closes gh-31368
2022-06-13 13:41:03 -07:00
Phillip Webb 7e2b325b36 Include auto-configuration and management import files in parent POM
Update the `maven-shade-plugin` configuration to include transformation
of the new `AutoConfiguration.imports` and
`ManagementContextConfiguration.imports` files.

Fixes gh-31316
2022-06-13 13:40:53 -07:00
Stephane Nicoll 216d156968 Refine native profile to use a classifier for the repackaged jar
This commit refines 80470f0b26 so that the 'repackage' goal of the
Spring Boot maven plugin uses a classifier. Previously, a regular
package with the profile fails as the Native Build Tools is trying to
use the repackaged archive as a regular jar file.

This is temporary as we'd like to explore other solutions, including
suggesting an additional option in the NBT plugin itself that uses the
regular classpath, rather than the produced jar.

See gh-30830
2022-05-18 15:45:40 +02:00
Andy Wilkinson 80470f0b26 Add native profile to spring-boot-starter-parent
Closes gh-30830

Co-authored-by: Stephane Nicoll <snicoll@vmware.com>
2022-04-28 14:27:56 +01:00
Andy Wilkinson f025ab629a Switch to new coordinates for Git Commit ID Maven Plugin
Closes gh-29515
2022-01-20 17:37:03 +00:00
dramatist ac2ef33107 Upgrade Java version to 17 in spring-boot-starter-parent's pom
See gh-28928
2021-12-09 11:51:19 +00:00
Stephane Nicoll ff59bb3abf Configure resources filtering encoding
Closes gh-24576
2020-12-23 10:44:06 +01:00
Andy Wilkinson 2d1dffa3ad Correct additions to spring-boot-starter-parent's pom
Following the fix for gh-21989, spring-boot-starter-parent no longer
contains an <issueManagement> element. As a result the additional
content was no longer being added to the pom. This commit updates
the additions so that they are now added after the <scm> element
that is still present.

See gh-21989
2020-06-17 11:51:54 +01:00
Andy Wilkinson e484246388 Add missing implementation attributes to Shade config
Fixes gh-21304
2020-05-04 15:58:33 +01:00
Stephane Nicoll 1c70b6735a Remove plugin management for exec-maven-plugin
Closes gh-20883
2020-04-08 17:51:22 +02:00
Russell Scheerer d61029a37a Fix Spring Boot version reference in spring-boot-starter-parent
See gh-20143
2020-02-13 08:30:21 +01:00
Russell Scheerer 7f23b9dc16 Fix variable reference in maven-shade-plugin configuration
See gh-20052
2020-02-06 16:37:08 +01:00
dreis2211 42e34673a6 Remove obsolete files
See gh-19896
2020-01-24 14:20:21 +01:00
Phillip Webb 0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
2020-01-22 15:49:52 -08:00
dreis2211 088e79f446 Add UTF-8 encoding to spring-boot-starter-parent POM
See gh-19835
2020-01-21 09:36:38 +01:00