mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-27 16:08:21 +00:00
Fix final output
This commit is contained in:

committed by
Peter Palaga

parent
03d6d49e7b
commit
2b6f604d5e
@@ -107,20 +107,24 @@ public class TerminalOutput implements ClientOutput {
|
||||
@Override
|
||||
public void accept(Message entry) {
|
||||
assert "main".equals(Thread.currentThread().getName());
|
||||
doAccept(entry);
|
||||
update();
|
||||
if (doAccept(entry)) {
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(List<Message> entries) {
|
||||
assert "main".equals(Thread.currentThread().getName());
|
||||
boolean update = true;
|
||||
for (Message entry : entries) {
|
||||
doAccept(entry);
|
||||
update &= doAccept(entry);
|
||||
}
|
||||
if (update) {
|
||||
update();
|
||||
}
|
||||
update();
|
||||
}
|
||||
|
||||
private void doAccept(Message entry) {
|
||||
private boolean doAccept(Message entry) {
|
||||
switch (entry.getType()) {
|
||||
case Message.BUILD_STARTED: {
|
||||
BuildStarted bs = (BuildStarted) entry;
|
||||
@@ -147,7 +151,7 @@ public class TerminalOutput implements ClientOutput {
|
||||
final AttributedStyle s = new AttributedStyle().bold().foreground(AttributedStyle.RED);
|
||||
new AttributedString(msg, s).println(terminal);
|
||||
terminal.flush();
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
case Message.PROJECT_STARTED:
|
||||
case Message.MOJO_STARTED: {
|
||||
@@ -180,7 +184,7 @@ public class TerminalOutput implements ClientOutput {
|
||||
} finally {
|
||||
terminal.flush();
|
||||
}
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
case Message.KEEP_ALIVE: {
|
||||
break;
|
||||
@@ -193,7 +197,6 @@ public class TerminalOutput implements ClientOutput {
|
||||
}
|
||||
case Message.PROMPT: {
|
||||
Message.Prompt prompt = (Message.Prompt) entry;
|
||||
|
||||
readInput.writeLock().lock();
|
||||
try {
|
||||
display.update(Collections.emptyList(), 0);
|
||||
@@ -265,7 +268,7 @@ public class TerminalOutput implements ClientOutput {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user