apache / apache/maven

[MNG-7525] Automatic handling of non multi thread safe mojos

Open
#9,107 0 comments 0 reactions 0 assignees View on GitHub
enhancement priority:major
Dominant language
Java
Stars
5.3k
Forks
3.1k
Avg merge
20h 42m
Merged PRs (30d)
297

Description

**[Christoph Läubrich](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=laeubi)** opened **[MNG-7525](https://issues.apache.org/jira/browse/MNG-7525?redirect=false)** and commented

Currently, when I run a mojo that is not marked as thread safe, one gets a warning from maven. The usual "workaround" is to ask the mojo author to add a global lock and mark the mojo as thread safe, but this is rather useless, because the Mojo obviously not became "thread-safer", requires additional code and release ...

It would be better if maven handle this internally e.g. simply synchronize on the mojo-class-object  when executing a mojo that is not marked as thread-safe.

---

1 votes, 1 watchers

Contributor guide

Open the contributing guide

Research direction

No files, tests, or entry points are named. Start by tracing Maven core's mojo execution path for mojos not marked thread-safe, then evaluate the proposed synchronization on the mojo class object. Done means non-thread-safe mojos are handled internally without requiring plugin changes, with concurrency behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.