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
This commit changes the order of precedence for the `arguments` property
of the AbstractRunMojo so that values specified in the POM override
values provided on the command line using `spring-boot.run.arguments`.
This brings the `arguments` property in line with all other Mojo
parameters.
Fixes gh-20024
Previously, Maven's default behaviour was relied up which resulted
in the artifact ID being appended to each URL as it was inherited.
This behaviour can only be disabled in Maven 3.6 and later, a version
that we cannot use due to an incompatibility with the Flatten Plugin.
This commit works around Maven's default behaviour by defining
properties for the SCM URL, connection, and developer connection and
then explicitly defining the settings in each pom using these
properties. The explicit definition of the properties in each pom
prevents them being inherited from the parent, thereby disabling the
unwanted appending of the artifact ID to the URL.
Fixes gh-18328
This commit prevents a potential NPE if the startTime of the
MavenSession is not available and fallbacks to the current time. This
can happen when invoking the plugin with Maven embedded in an IDE.
Closes gh-17810
Update `BuildInfoMojo` so that the time property now defaults to
`${session.request.startTime}` rather than the time the Mojo was
created. Also update javadoc to make it clear that any supplied
value will be passed to `Instant.parse`.
See gh-17390
Apply checkstyle rule to ensure that private and package private
classes do not have unnecessary public methods. Test classes have
also been unified as much as possible to use default scoped
inner-classes.
Closes gh-7316