You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2022/07/18 11:40:00 UTC
[jira] [Closed] (MNG-7511) Ensure the degreeOfConcurrency is a positive number in MavenExecutionRequest
[ https://issues.apache.org/jira/browse/MNG-7511?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed MNG-7511.
-------------------------------
Resolution: Fixed
Fixed with [03b1faff7eec915f8b277d307d3e3aa0d0a24fdf|https://gitbox.apache.org/repos/asf?p=maven.git;a=commit;h=03b1faff7eec915f8b277d307d3e3aa0d0a24fdf].
> 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
>
> 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)