[
https://issues.apache.org/jira/browse/MNG-7511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Guillaume Nodet updated MNG-7511:
---------------------------------
Fix Version/s: 4.0.0-alpha-2
> Ensure the degreeOfConcurrency is a positive number in MavenExecutionRequest
> ----------------------------------------------------------------------------
>
> Key: MNG-7511
> URL: https://issues.apache.org/jira/browse/MNG-7511
> Project: Maven
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.8.6
> Reporter: Josef Cacek
> Assignee: Michael Osipov
> Priority: Major
> Fix For: 3.9.0, 4.0.0-alpha-1, 4.0.0-alpha-2, 4.0.0
>
>
> The {{degreeOfConcurrency}} should always be a positive number, otherwise
> builds might fail.
> In Hazelcast we build with threads set to {{-T 0.5C}} in
> [{{.mvn/maven.config}}|https://github.com/hazelcast/hazelcast/blob/v5.1.2/.mvn/maven.config].
> This is fine until we run the build on a single CPU machine. It fails then
> with {{IllegalArgumentException}} as the computed {{degreeOfConcurrency ==
> 0}}.
> Stacktrace from Maven 3.6.3:
> {code}
> [ERROR] IllegalArgumentException
> java.lang.IllegalArgumentException
> at java.util.concurrent.ThreadPoolExecutor.<init>
> (ThreadPoolExecutor.java:1293)
> at java.util.concurrent.ThreadPoolExecutor.<init>
> (ThreadPoolExecutor.java:1215)
> at java.util.concurrent.Executors.newFixedThreadPool (Executors.java:155)
> at
> org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder.build
> (MultiThreadedBuilder.java:88)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute
> (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
> at jdk.internal.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:62)
> at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke (Method.java:566)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced
> (Launcher.java:282)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch
> (Launcher.java:225)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode
> (Launcher.java:406)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main
> (Launcher.java:347)
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)