[ 
https://issues.apache.org/jira/browse/MNG-8725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17953056#comment-17953056
 ] 

Matthias Bünger commented on MNG-8725:
--------------------------------------

{quote}That makes sense to me. Any proposal for the syntax to use ?{quote}

As this is a dynamic value, I think a numeric thing like {{-1}} might confuse 
people. I would suggest {{max}} 

So a call would be 

{code}
mvn goal -Tmax
{code}

and cause the build to run with max minus one (but ofc at least a minimum of 
one)

> Option for "-T" argument: Use max cores minus 1
> -----------------------------------------------
>
>                 Key: MNG-8725
>                 URL: https://issues.apache.org/jira/browse/MNG-8725
>             Project: Maven
>          Issue Type: Improvement
>    Affects Versions: 3.9.9
>            Reporter: Matthias Bünger
>            Priority: Major
>
> You can enable parallel builds in Maven using the {{-T}} argument and pass 
> the number of threads or threads per core (see: 
> https://cwiki.apache.org/confluence/display/MAVEN/Parallel+builds+in+Maven+3 
> ).
> The Maven Daemon uses the maxinum number of cores minus 1 per default for max 
> effiencey without blocking the system. 
> Sadly there is no option for the Maven core to behave like this. So each 
> developer has either to have the same number of cores available (which is 
> often not the case) or pass his/her individual number of threads on each call.
> It would be great to have a built-in argument to use maximum -1 cores like 
> the Daemon does.
> Note: I write cores all the time, because threads in this context are 
> hardware threads (and no virtual threads possible with Java 21 and I don't 
> want to mix this even that Maven is not yet on Java 21)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to