@@ -74,6 +74,13 @@ public class InstallHooksMojo extends AbstractMavenGitCodeFormatMojo {
7474 @ Parameter (property = "gcf.preCommitHookPipeline" , defaultValue = "" )
7575 private String preCommitHookPipeline ;
7676
77+ /**
78+ * If present, this value will be passed to '-T, --threads Thread count, for instance 2.0C where C
79+ * is core multiplied'
80+ */
81+ @ Parameter (property = "gcf.hookMavenThreadCount" )
82+ private String hookMavenThreadCount ;
83+
7784 public void execute () throws MojoExecutionException {
7885 if (!isExecutionRoot ()) {
7986 getLog ().debug ("Not in execution root. Do not execute." );
@@ -143,11 +150,14 @@ private String mavenCliArguments() {
143150 .filter (prop -> System .getProperty (prop ) != null )
144151 .map (prop -> "-D" + prop + "=" + System .getProperty (prop ));
145152
146- Stream <String > properties = Stream .concat (propagatedProperties , Stream .of (propertiesToAdd ));
153+ Stream <String > arguments = Stream .concat (propagatedProperties , Stream .of (propertiesToAdd ));
147154 if (preCommitHookPipeline != null && !preCommitHookPipeline .isEmpty ()) {
148- properties = Stream .concat (properties , Stream .of (preCommitHookPipeline ));
155+ arguments = Stream .concat (arguments , Stream .of (preCommitHookPipeline ));
156+ }
157+ if (hookMavenThreadCount != null && !hookMavenThreadCount .isEmpty ()) {
158+ arguments = Stream .concat (arguments , Stream .of ("-T " + hookMavenThreadCount ));
149159 }
150- return properties .collect (Collectors .joining (" " ));
160+ return arguments .collect (Collectors .joining (" " ));
151161 }
152162
153163 private Path prepareHooksDirectory () {
0 commit comments