Commit Graph

122 Commits

Author SHA1 Message Date
Phillip Webb
39e3746cf6 Force Eclipse to use JavaSE-1.8 runtime
Add `EclipseConventions` to force the JavaSE-1.8 runtime to be applied
to the imported projects.

Closes gh-26669
2021-05-25 17:38:55 -07:00
Andy Wilkinson
deca737b01 Configure source and target compatibility at the task level
Closes gh-26350
2021-05-04 10:29:54 +01:00
Andy Wilkinson
3cc1ed28ca Order test tasks to run after Checkstyle and formatting checks
Closes gh-26284
2021-04-29 12:23:02 +01:00
Andy Wilkinson
3a3eb1bc31 Fix workaround for JDK-8156584
See gh-26252
2021-04-28 19:49:26 +01:00
Andy Wilkinson
ecd1e536cc Refine workaround for JDK-8156584
The previous workaround worked but prevented caching of every test
task as the value of system property pointing to the custom security
properties file varied from build to build.

This commit refines the workaround to copy the file into the build
directory of the test task's project and reference it using a URL
that's relative to the task's working directory. This ensures that
the value of the system property doesn't change from build to build.

Closes gh-26252
2021-04-28 18:22:37 +01:00
Andy Wilkinson
79ecf596ec Set path sensitivity when configuring additional task inputs
Previously a number of file- or directory-based task inputs were
configured with specifying their path sensitivity. This meant
that the default absolute path sensitivity was used. For caches
that are cacheable this would result in a cache miss when the
inputs were identical other than being located at a different
absolute path as they are when running a CI build vs a local build.

This commit updates the configuration of additional task inputs
to use relative path sensitivity. A property name for each input has
also been configured. This makes them easier to identify in build
scans.

Closes gh-26270
2021-04-28 13:16:36 +01:00
Andy Wilkinson
912c82e50d Work around https://bugs.openjdk.java.net/browse/JDK-8156584
sun.security.x509.AlgorithmId.get(String) isn't thread-safe and can
lead to null be returned for an algorithm that should be present.

This commit aims to work around this problem by avoiding the call
to AlgorithmId.get(String). It does so by configuring the
PKCS12 key protection algorithm to one that starts with
pbewithhmacsha (case insensitive). This short-circuits the logic
in PKCS12KeyStore.mapPBEAlgorithmToOID(String) and avoids the call to
AlgorithmId.get(String). Thanks again to @dreis2211 for the
suggestion.

The work around is only used when building with Java 8 as the problem
was fixed in Java 9.

Closes gh-26252
2021-04-27 17:27:28 +01:00
Phillip Webb
fcb2210a87 Include optional shade plugin in published pom
Update `MavenPublishingConventions` to add a new `mavenOptional` feature
that allows us to declare optional dependencies that are also published
in the generated POM.

This change allows us to include the maven-shade-plugin in the
spring-boot-maven-plugin POM which fixes an issue with Eclipse m2e.

Fixes gh-21992
2021-04-14 15:02:42 -07:00
Andy Wilkinson
709db5582b Ensure that classes and resources are in place before documenting
Closes gh-25948
2021-04-09 17:45:38 +01:00
Andy Wilkinson
d7b43a3c68 Filter out non-public classes when documenting auto-config classes
Fixes gh-25948
2021-04-09 17:09:19 +01:00
Andy Wilkinson
7c8caf9ef5 Configure Kotlin compilation to use 1.3 apiVersion and languageVersion
Closes gh-25793
2021-04-07 11:43:39 +01:00
Andy Wilkinson
76f74482d4 Make Asciidoctor tasks run when Java examples are updated
Closes gh-25892
2021-04-06 19:35:38 +01:00
Phillip Webb
82127fdaa3 Update copyright year of changed files 2021-03-23 12:50:49 -07:00
Andy Wilkinson
2359b37e69 Polish 2021-03-16 19:43:35 +00:00
Andy Wilkinson
bf33e7ef7e Automatically supersede existing upgrade issue when running Bomr
Closes gh-25345
2021-03-16 19:09:38 +00:00
Andy Wilkinson
11b77037f1 Make TestFailuresPlugin compatible with Gradle's configuration cache
Closes gh-25405
2021-02-24 12:26:03 +00:00
Mustafa Ulu
abc90db32f Fix wording error in build-info goal description
See gh-25382
2021-02-22 10:26:53 +01:00
Andy Wilkinson
63402a2984 Truncate files before writing new content to them
Previously, UpgradeApplicator would open build.gradle
using open options that left the fields existing content intact. It
would then write the new content at the beginning of the file. If
the new content was n bytes shorter than the existing content, this
would leave n bytes of the existing content at the end of the file.

This commit updates UpgradeApplicator to truncate the existing file
when it opens it. This ensures that the existing content is
completely replaced by the new content, irrespective of their lengths.

Closes gh-25256
2021-02-12 12:37:23 +00:00
Andy Wilkinson
413256501f Require a milestone when upgrading dependencies
Closes gh-25225
2021-02-12 11:51:39 +00:00
Andy Wilkinson
2ba9a8c211 Polish "Remove duplicate declaration of jackson-databind"
See gh-25178
2021-02-11 10:08:34 +00:00
Vitalii Mahas
a2c491ef43 Remove duplicate declaration of jackson-databind
See gh-25178
2021-02-11 10:08:22 +00:00
Andy Wilkinson
b6d2da0f84 Stop integer default values from becoming decimals
Fixes gh-25172
2021-02-10 19:05:38 +00:00
Andy Wilkinson
67479b6380 Add junit-platform-launcher dependency by convention
Closes gh-25074
2021-02-02 13:03:21 +00:00
Andy Wilkinson
5a02996eca Fix release train version's comparison with other version types
Fixes gh-24782
2021-01-12 14:16:13 +00:00
dreis2211
261b7a5b18 Update copyrights to 2021
See gh-24625
2021-01-01 09:17:13 +01:00
Brian Clozel
d2895e7453 Upgrade to Spring Doc Resources 0.2.5
Fixes gh-24146
2020-12-07 20:28:04 +01:00
Phillip Webb
e0a061707e Fix checkstyle header violation
See gh-24337
2020-12-05 07:51:37 -08:00
Phillip Webb
5f351a6983 Merge branch '2.2.x' into 2.3.x
Closes gh-24338
2020-12-04 18:21:57 -08:00
Stephane Nicoll
ac05356427 Merge branch '2.2.x' into 2.3.x
Closes gh-24195
2020-11-18 10:34:17 +01:00
Andy Wilkinson
189046bd4f Revert "Reduce scope of META-INF customizations to main, source, and javadoc jars"
Closes gh-24131
2020-11-12 08:11:00 +00:00
Brian Clozel
e98db484bc Upgrade to spring-doc-resources 0.2.4
Closes gh-24066
2020-11-06 14:48:53 +01:00
Andy Wilkinson
1e100677c7 Reduce scope of META-INF customizations to main, source, and javadoc jars
Closes gh-23955
2020-11-05 15:01:08 +00:00
Andy Wilkinson
49ea023a64 Upgrade to test-retry-gradle-plugin 1.1.9
Closes gh-24055
2020-11-05 14:37:22 +00:00
Andy Wilkinson
e820400748 Polish manifests of source and javadoc jars
Previously, the main jar file and the source and javadoc jar files all
had the same changes applied to their manifests.

The commit changes the Implementation-Title of source and javadoc jars
so that the title indicates that's what they are. Rather than using
the project's description as the title (as is done for the main jar),
the titles for source and javadoc jars will now be "Source for
${project.name}" and "Javadoc for ${project.name}" respectively.

Closes gh-23974
2020-11-03 09:50:36 +00:00
Phillip Webb
33d66b7f82 Fix to spring-doc-resources version
See gh-23824
2020-10-29 09:16:37 -07:00
Phillip Webb
2992f40222 Upgrade to spring-doc-resources 0.2.3.RELEASE
Closes gh-23824
2020-10-29 09:06:23 -07:00
Andy Wilkinson
dcb42c36f9 Ensure that additional metadata is available to annotation processor
Fixes gh-23934
2020-10-29 09:07:05 +00:00
Scott Frederick
9c672deb2d Add javadoc links in Maven plugin parameter docs
This commit modifies the documentation generated for the
Maven plugin to include links to javadoc when Spring
Boot types are mentioned. Some javadoc was also polished
to improve the generated docs.

Fixes gh-21555
2020-10-16 17:45:46 -05:00
Andy Wilkinson
358b9f839a Remove spring-boot.version property from spring-boot-dependencies
The version of Spring Boot should not be modifiable by a property,
only being using a different version of spring-boot-dependencies or
spring-boot-starter-parent.

Fixes gh-23174
2020-09-16 18:25:17 +01:00
Andy Wilkinson
181e3b34ba Isolate Maven Plugin's integration tests from repo.spring.io
Previously, the Maven plugin integration tests used a settings.xml file
that defined https://repo.spring.io/snapshot as a repository. This
allowed them to resolve snapshots of the plugin's Spring Framework
dependencies but it had the unfortunate side-effect of also allowing
them to resolve snapshots of other Spring Boot modules from Artifactory
rather than using those currently being built.

This commit replaces the repositories in settings.xml with a Gradle
task that resolves the necessary dependencies and populates a local
repository with the dependencies' jars and pom files. This is achieved
using a ComponentMetadataRule that creates a custom variant of each
dependency that includes its pom file, inspired by the example in
gradle/gradle/#11449. A configuration that extends the
runtimeClasspath configuration and select the custom variant via its
attribute is then used to resolve the jars and pom files of the runtime
classpath such that they can then be used to populate the local
repository.

Closes gh-22828
2020-08-07 17:18:47 +01:00
Andy Wilkinson
d064ccabc4 Ensure Maven plugin descriptor inputs are out-of-date on version change
Closes gh-22766
2020-08-06 18:18:04 +01:00
Andy Wilkinson
98115239b3 Only create effective bom artifact when needed
Closes gh-22143
2020-07-24 16:44:46 +01:00
Andy Wilkinson
e080dcf8a4 Configure path sensitivity of tasks' file inputs
Closes gh-22359
2020-07-16 16:09:58 +01:00
Andy Wilkinson
be8cd9e867 Extend DefaultTask rather than AbstractTask in buildSrc
Closes gh-22288
2020-07-09 15:31:03 +01:00
Andy Wilkinson
b24f17b35c Rework spring-boot-docs to be a full-blown java project
Previously, spring-boot-docs used the java-base-plugin and then added
configuration on top. This has proven to be error prone, with the most
recent problem being that the tests were not being compiled and run.

This commit changes approach and applies the java plugin to the project
instead of the java-base plugin. Now, rather than adding the necessary
configuration to the base, the unwanted pieces of the java plugin's
configuration – specifically the jar and javadoc tasks – are disabled
instead. The DeployedPlugin has also been updated so that it does not
create a publication from the java component for projects that have a
disabled jar task.

Closes gh-22284
2020-07-09 11:21:03 +01:00
Andy Wilkinson
12d3f14e15 Use bom plugin to configure spring-boot-parent
Closes gh-21439
2020-06-23 10:43:59 +01:00
Andy Wilkinson
a6954614b2 Minimize contents of poms that are an ancestor of a user's pom
Fixes gh-21989
2020-06-17 09:54:53 +01:00
Andy Wilkinson
0de466e06e Require dependency on s-b-dependencies to use its constraints
Previously, Spring Boot's modules published Gradle Module Metadata
(GMM) the declared a platform dependency on spring-boot-dependencies.
This provided versions for each module's own dependencies but also had
they unwanted side-effect of pulling in spring-boot-dependencies
constraints which would influence the version of other dependencies
declared in the same configuration. This was undesirable as users
should be able to opt in to this level of dependency management, either
by using the dependency management plugin or by using Gradle's built-in
support via a platform dependency on spring-boot-dependencies.

This commit reworks how Spring Boot's build uses
spring-boot-dependencies and spring-boot-parent to provide its own
dependency management. Configurations that aren't seen by consumers are
configured to extend a dependencyManagement configuration that has an
enforced platform dependency on spring-boot-parent. This enforces
spring-boot-parent's version constraints on Spring Boot's build without
making them visible to consumers. To ensure that the versions that
Spring Boot has been built against are visible to consumers, the
Maven publication that produces pom files and GMM for the published
modules is configured to use the resolved versions from the module's
runtime classpath.

Fixes gh-21911
2020-06-16 08:50:21 +01:00
Andy Wilkinson
24138c104c Use highlightjs for syntax highlighting in Asciidoctor's HTML output
Closes gh-21701
2020-06-04 20:25:29 +01:00
Andy Wilkinson
c0f748e143 Always apply retry plugin but only retry on CI
Previously, the retry plugin was only applied on CI as we do not want
tests to be retried in local builds. Unfortunately, this arrangement
led to test tasks from CI builds having additional doFirst and doLast
actions and an additional property. These differences meant that the
output from a test task that has run on CI could not be used by a
local build.

This commit changes our configuration of the test retry plugin so
that it is now always applied. To retain the behaviour of only
retrying tests on CI, max retries is configured to 3 on CI and 0 for
local builds.

Closes gh-21698
2020-06-04 16:10:12 +01:00