[ https://issues.apache.org/jira/browse/MNG-7511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17690613#comment-17690613 ]
Michael Osipov commented on MNG-7511: ------------------------------------- Fixed with [a1c537342bea5c395bfefb2031abd08b5830b43a|https://gitbox.apache.org/repos/asf?p=maven.git&a=commit&h=a1c537342bea5c395bfefb2031abd08b5830b43a] for {{maven-3.8.x}} branch. > 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-2, 4.0.0, 3.8.8 > > > 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)