You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for evaluating one or more Groovy scripts in the Develocity storage directory
This change enables a user to place one or more Groovy scripts in the Develocity storage directory for evaluation. Previously, only a single script at a fixed location of `.mvn/develocity-custom-user-data.groovy` in the project root could be evaluated.
This change supports users who need to configure Develocity for any Maven build running on a given machine, without the need to create a custom extension.
Copy file name to clipboardExpand all lines: README.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,11 +57,13 @@ captured and under which conditions.
57
57
58
58
## Capturing additional tags, links and values in your build scans
59
59
60
-
You can apply additional configuration beyond what is contributed by the Common Custom User Data Maven extension by default. The additional configuration happens in a specific
61
-
Groovy script. This is a good intermediate step before creating your own extension.
60
+
You can apply additional configuration beyond what is contributed by the Common Custom User Data Maven extension by default.
61
+
The extension evaluates Groovy scripts from two locations:
62
62
63
-
The Common Custom User Data Maven extension checks for a `.mvn/develocity-custom-user-data.groovy` or `.mvn/gradle-enterprise-custom-user-data.groovy` Groovy script in your root project. If the file exists, it evaluates
64
-
the script with the following bindings:
63
+
1. A `.mvn/develocity-custom-user-data.groovy` or `.mvn/gradle-enterprise-custom-user-data.groovy` in your root project
64
+
2. Any files matching `*.groovy` in the directory `~/.mvn/.develocity/custom-user-data/`
65
+
66
+
Any matching files are evaluated with the following bindings:
The Groovy scripts are evaluated in the exact order listed above, with the scripts in `~/.mvn/.develocity/custom-user-data/` being executed in alphabetical order.
76
+
73
77
See [here](.mvn/develocity-custom-user-data.groovy) for an example.
74
78
75
79
## Developing a customized version of the extension
0 commit comments