[ https://issues.apache.org/jira/browse/MNG-5965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16064431#comment-16064431 ]
Janos Gyerik commented on MNG-5965: ----------------------------------- Although {{sonar:sonar}} is mentioned here, it's not required for the reproducer, and it has nothing to do with the issue here. You can reproduce for example with {{mvn clean install:install-file -Dfile=path/to/jar -T10}}, and get an output as below. Notice the duplicate steps. {code} [INFO] Scanning for projects... [INFO] [INFO] Using the MultiThreadedBuilder implementation with a thread count of 10 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Example Project 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ my-project --- [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Example Project 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ my-project --- [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Example Project 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-install-plugin:2.5.2:install-file (default-cli) @ my-project --- [INFO] Installing /path/to/jar to /path/to/maven/repo [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Example Project 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-install-plugin:2.5.2:install-file (default-cli) @ my-project --- [INFO] Installing /path/to/jar to /path/to/maven/repo [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.638 s (Wall Clock) [INFO] Finished at: 2017-06-27T09:55:48+02:00 [INFO] Final Memory: 11M/240M [INFO] ------------------------------------------------------------------------ {code} > Parallel build multiplies work if multiple goals are given > ---------------------------------------------------------- > > Key: MNG-5965 > URL: https://issues.apache.org/jira/browse/MNG-5965 > Project: Maven > Issue Type: Bug > Components: Bootstrap & Build > Affects Versions: 3.3.9 > Environment: Windows 7 64bit > Reporter: Matthias Schmalz > Attachments: parallel.test.zip > > > When I run a parallel build which invokes multiple goals Maven multiplies the > work e.g. when I run > install sonar:sonar > Every phase is executed once as expected. However when I run > install sonar:sonar -T 4 > Every phase is executed twice. > The problem can be reproduced with a single simple Java project (of course > parallel builds are useless with a single module). Debugging showed that > every Mojo is really called twice per project. > Find attached a simple project and two build outputs, where you can see that > the parallel build is doing everything twice (you can ignore that Sonar fails > in the end, due to no server is up). -- This message was sent by Atlassian JIRA (v6.4.14#64029)