简体   繁体   English

Maven控制台输出中的有角括号

[英]Angled brackets in Maven console output

Looking at the picture below, I noticed that Maven sometimes prints 3 angled brackets (">>>" or "<<<") when invoking particular goals. 看下面的图片,我注意到Maven有时会在调用特定目标时打印3个有角度的括号(“>>>”或“<<<”)。

在此输入图像描述

What do these angled brackets mean? 这些有角度的括号是什么意思?

All other goal invocations are preceded by 3 hyphens ("---"). 所有其他目标调用前面都有3个连字符(“---”)。 My guess is that goals (in this case, the devserver_stop goal) preceded by angled brackets are executed asynchronously. 我的猜测是,以角度括号开头的目标(在本例中为devserver_stop目标)是异步执行的。 If that's the case, how can I make these goals be executed synchronously? 如果是这种情况,我怎样才能同步执行这些目标?

You are close - the >>> means it is going to fork a new execution of Maven. 你很接近 - >>>意味着它将分支新的Maven执行。 I couldn't find much detail, but you can look here http://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-plugins-lifecycle.html . 我找不到太多细节,但你可以在这里查看http://books.sonatype.com/mvnref-book/reference/writing-plugins-sect-plugins-lifecycle.html I think it's still synchronous from Maven's point of view, but just in a separate execution. 我认为从Maven的观点来看它仍然是同步的,但只是在一个单独的执行中。

The plugin you're talking about spawns its own threads, so is inherently asynchronous, but that's not to do with Maven. 你正在谈论的插件会产生自己的线程,因此本质上是异步的,但这与Maven无关。

You can see the configuration of the appengine plugin here http://code.google.com/p/appengine-maven-plugin/source/browse/src/main/java/com/google/appengine/devappserver/DevAppServerAsyncStart.java - it's the @execute phase="package" that means it forks. 您可以在http://code.google.com/p/appengine-maven-plugin/source/browse/src/main/java/com/google/appengine/devappserver/DevAppServerAsyncStart.java查看appengine插件的配置 -它是@execute phase="package"意味着它的分叉。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM