[ 
https://issues.apache.org/jira/browse/MNG-7476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17537724#comment-17537724
 ] 

ASF GitHub Bot commented on MNG-7476:
-------------------------------------

michael-o commented on code in PR #736:
URL: https://github.com/apache/maven/pull/736#discussion_r874051177


##########
maven-core/src/main/java/org/apache/maven/lifecycle/internal/MojoExecutor.java:
##########
@@ -282,6 +308,32 @@ private Lock getProjectLock( MavenSession session )
         }
     }
 
+    static class OwnerReentrantLock extends ReentrantLock
+    {
+        @Override
+        public Thread getOwner()
+        {
+            return super.getOwner();
+        }
+    }
+
+    static class OwnerReentrantReadWriteLock extends ReentrantReadWriteLock
+    {
+        @Override
+        public Thread getOwner()
+        {
+            return super.getOwner();
+        }
+    }
+
+    private static void warn( String msg )
+    {
+        for ( String s : MessageHelper.formatWarning( msg ) )
+        {
+            LOGGER.warn( s );
+        }

Review Comment:
   Well, look into 
/maven-embedder/src/main/java/org/apache/maven/cli/transfer/ConsoleMavenTransferListener.java,
 I do synchronize there to make console output project. Since the logger is 
static final you can use it as monitor, no?





> Display a warning when an aggregator mojo is locking other mojo executions
> --------------------------------------------------------------------------
>
>                 Key: MNG-7476
>                 URL: https://issues.apache.org/jira/browse/MNG-7476
>             Project: Maven
>          Issue Type: Improvement
>    Affects Versions: 3.8.5
>            Reporter: Guillaume Nodet
>            Assignee: Guillaume Nodet
>            Priority: Major
>             Fix For: 3.8.6, 3.9.0, 4.0.0-alpha-1, 4.0.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to