You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2024/07/12 09:14:58 UTC
(logging-parent) branch develocity updated: Auto-generate Develocity extensions configuration
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch develocity
in repository https://gitbox.apache.org/repos/asf/logging-parent.git
The following commit(s) were added to refs/heads/develocity by this push:
new c811cfd Auto-generate Develocity extensions configuration
c811cfd is described below
commit c811cfd90480ee68e5c2ac848bc75e04e70874ef
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Jul 12 11:12:59 2024 +0200
Auto-generate Develocity extensions configuration
In order to restrict the usage of Develocity to the main build, we
generate the `.mvn/extensions.xml` file and remove it after the build.
---
.github/workflows/build-reusable.yaml | 30 ++++++++++++++++++++++++++++++
pom.xml | 16 ++++++++++++++++
2 files changed, 46 insertions(+)
diff --git a/.github/workflows/build-reusable.yaml b/.github/workflows/build-reusable.yaml
index b6a01c9..aa8ac98 100644
--- a/.github/workflows/build-reusable.yaml
+++ b/.github/workflows/build-reusable.yaml
@@ -63,6 +63,30 @@ jobs:
java-version: ${{ inputs.java-version }}
cache: maven
+ - name: Set up Develocity
+ env:
+ HAS_TOKEN: ${{ secrets.GE_ACCESS_TOKEN != null }}
+ shell: bash
+ run: |
+ if [ -f .mvn/develocity.xml -a "$HAS_TOKEN" == "true" ]; then
+ DEVELOCITY_VERSION=$(./mvnw help:evaluate -q -DforceStdout -Dexpression=develocity-maven-plugin.version)
+ USER_DATA_VERSION=$(./mvnw help:evaluate -q -DforceStdout -Dexpression=common-custom-user-data-maven-extension.version)
+ cat >.mvn/extensions.xml <<EOF
+ <extensions>
+ <extension>
+ <groupId>com.gradle</groupId>
+ <artifactId>develocity-maven-extension</artifactId>
+ <version>$DEVELOCITY_VERSION</version>
+ </extension>
+ <extension>
+ <groupId>com.gradle</groupId>
+ <artifactId>common-custom-user-data-maven-extension</artifactId>
+ <version>$USER_DATA_VERSION</version>
+ </extension>
+ </extensions>
+ EOF
+ fi
+
# We could have used `verify`, but `clean install` is required while generating the build reproducibility report, which is performed in the next step.
# For details, see: https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility
- name: Build
@@ -77,6 +101,12 @@ jobs:
-DinstallAtEnd=true \
clean install
+ - name: Clean up Develocity
+ if: always()
+ shell: bash
+ run: |
+ rm -f .mvn/extensions.xml
+
# Node.js cache is needed for Antora
- name: Set up Node.js cache
if: inputs.site-enabled
diff --git a/pom.xml b/pom.xml
index e5792bc..e469d72 100644
--- a/pom.xml
+++ b/pom.xml
@@ -222,7 +222,9 @@
<bnd-maven-plugin.version>7.0.0</bnd-maven-plugin.version>
<bnd-baseline-maven-plugin.version>7.0.0</bnd-baseline-maven-plugin.version>
<build-helper-maven-plugin.version>3.6.0</build-helper-maven-plugin.version>
+ <common-custom-user-data-maven-extension.version>2.0</common-custom-user-data-maven-extension.version>
<cyclonedx-maven-plugin.version>2.8.0</cyclonedx-maven-plugin.version>
+ <develocity-maven-plugin.version>1.21.5</develocity-maven-plugin.version>
<exec-maven-plugin.version>3.3.0</exec-maven-plugin.version>
<flatten-maven-plugin.version>1.6.0</flatten-maven-plugin.version>
<frontend-maven-plugin.version>1.15.0</frontend-maven-plugin.version>
@@ -340,6 +342,20 @@
<version>${cyclonedx-maven-plugin.version}</version>
</plugin>
+ <!-- Fake entry to be upgraded by Dependabot -->
+ <plugin>
+ <groupId>com.gradle</groupId>
+ <artifactId>develocity-maven-plugin</artifactId>
+ <version>${develocity-maven-plugin.version}</version>
+ </plugin>
+
+ <!-- Fake entry to be upgraded by Dependabot -->
+ <plugin>
+ <groupId>com.gradle</groupId>
+ <artifactId>common-custom-user-data-maven-extension</artifactId>
+ <version>${common-custom-user-data-maven-extension.version}</version>
+ </plugin>
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>