Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.8.6
-
None
Description
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.
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:
[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)