maven: Support parallel builds
See original GitHub issueRunning mvn
with --threads 1C
(i.e. one thread per core) produces the following warning:
[WARNING] *****************************************************************
[WARNING] * Your build is requesting parallel execution, but project *
[WARNING] * contains the following plugin(s) that have goals not marked *
[WARNING] * as @threadSafe to support parallel building. *
[WARNING] * While this /may/ work fine, please look for plugin updates *
[WARNING] * and/or request plugins be made thread-safe. *
[WARNING] * If reporting an issue, report it against the plugin in *
[WARNING] * question, not against maven-core *
[WARNING] *****************************************************************
[WARNING] The following plugins are not marked @threadSafe in [REDACTED]
[WARNING] io.github.kobylynskyi:graphql-codegen-maven-plugin:2.0.0
[WARNING] Enable debug to see more precisely which goals are not marked @threadSafe.
Let’s get rid of that and enable smooth parallel builds, shall we? I’m happy to take any pointers towards an implementation, but am not sure yet whether I can PR, depending on the complexity of the change.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Parallel builds in Maven 3 - Apache Software Foundation
This build-mode analyzes your project's dependency graph and schedules modules that can be built in parallel according to the dependency graph of your...
Read more >Maven: how to do parallel builds? - Stack Overflow
Maven 3 (as of beta 1) now supports parallel builds as an experimental feature. For example, mvn -T 4 clean install # Builds...
Read more >Parallel builds in Maven 3 - Medium
This build-mode analyzes your project's dependency graph and schedules modules that can be built in parallel according to the dependency graph ...
Read more >Running JUnit Tests in Parallel with Maven - Baeldung
In this tutorial, we'll cover how to parallelize tests using JUnit and Maven's Surefire Plugin. First, we'll run all tests in a single...
Read more >Faster Maven builds - A Java geek
By default, Maven uses a single thread. In the age of multicores, this is just waste. It's possible to run parallel builds using...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@lorenzleutgeb I’ve decided to mark a plugin as threadSafe. The check-list from maven passed and I don’t see any issues besides “same output directory used by multiple modules” (which is the very unlikely situation and even if it is the case, then the client should disable parallel builds). Will release the change in version 3.2.0 this week.
Great, thanks!