From e41a53cf85f0dee0aeb0189a538655d51c0d87ea Mon Sep 17 00:00:00 2001 From: Nelson Osacky Date: Fri, 5 Jun 2020 14:40:55 +0200 Subject: [PATCH] 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 --- .gitignore | 1 + .mvn/extensions.xml | 12 +++++++ .mvn/gradle-enterprise.xml | 13 ++++++++ pom.xml | 33 +++++++++++++++++++ .../.mvn/empty-file-for-mvn | 1 + .../spring-boot-loader/pom.xml | 3 ++ .../spring-boot-maven-plugin/pom.xml | 3 ++ spring-boot-samples-invoker/pom.xml | 3 ++ 8 files changed, 69 insertions(+) create mode 100644 .mvn/extensions.xml create mode 100644 .mvn/gradle-enterprise.xml create mode 100644 spring-boot-project/spring-boot-starters/.mvn/empty-file-for-mvn diff --git a/.gitignore b/.gitignore index 9c1e3d013de..0b836fe4eaa 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ transaction-logs secrets.yml .gradletasknamecache .sts4-cache +.mvn/.gradle-enterprise/gradle-enterprise-workspace-id \ No newline at end of file diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml new file mode 100644 index 00000000000..4f01a30e017 --- /dev/null +++ b/.mvn/extensions.xml @@ -0,0 +1,12 @@ + + + com.gradle + gradle-enterprise-maven-extension + 1.5.3 + + + io.spring.ge.conventions + gradle-enterprise-conventions-maven-extension + 0.0.5 + + \ No newline at end of file diff --git a/.mvn/gradle-enterprise.xml b/.mvn/gradle-enterprise.xml new file mode 100644 index 00000000000..978dcbbd2fc --- /dev/null +++ b/.mvn/gradle-enterprise.xml @@ -0,0 +1,13 @@ + + + https://ge.spring.io + + + true + + + true + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 3557f73abce..96d333d2fae 100644 --- a/pom.xml +++ b/pom.xml @@ -250,5 +250,38 @@ + + + com.gradle + gradle-enterprise-maven-extension + + + + + + maven-checkstyle-plugin + + + + allowlist + + ${main.basedir}/src/checkstyle + + RELATIVE_PATH + + + + + propertyExpansion + ignoredValue + + + + + + + + + diff --git a/spring-boot-project/spring-boot-starters/.mvn/empty-file-for-mvn b/spring-boot-project/spring-boot-starters/.mvn/empty-file-for-mvn new file mode 100644 index 00000000000..6db7e363e91 --- /dev/null +++ b/spring-boot-project/spring-boot-starters/.mvn/empty-file-for-mvn @@ -0,0 +1 @@ +This file is empty so that the starters project does not generate multiple build scans. \ No newline at end of file diff --git a/spring-boot-project/spring-boot-tools/spring-boot-loader/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-loader/pom.xml index 4f821144ba7..fb238133be8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-loader/pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-loader/pom.xml @@ -88,6 +88,9 @@ true ${skipTests} true + + false + diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/pom.xml b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/pom.xml index 36d042b3996..cf43bc61ca4 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/pom.xml +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/pom.xml @@ -153,6 +153,9 @@ true ${skipTests} true + + false + diff --git a/spring-boot-samples-invoker/pom.xml b/spring-boot-samples-invoker/pom.xml index 1b6538aaf9a..bd3821f6314 100644 --- a/spring-boot-samples-invoker/pom.xml +++ b/spring-boot-samples-invoker/pom.xml @@ -29,6 +29,9 @@ pom.xml + + false +