Esempio n. 1
0
 /** Sends the accumulated log in {@link SplittableBuildListener} to the log of this build. */
 public void appendLastLog() {
   try {
     sync();
     listener.setSideOutputStream(log);
     listener.setSideOutputStream(null);
   } catch (IOException e) {
     e.printStackTrace();
   }
 }
Esempio n. 2
0
 /**
  * Before we touch I/O streams, we need to make sure all the remote I/O operations are locally
  * completed, or else we end up switching the log traffic at unaligned moments.
  */
 private void sync() throws IOException {
   try {
     Channel ch = Channel.current();
     if (ch != null) listener.synchronizeOnMark(ch);
   } catch (InterruptedException e) {
     // our signature doesn't allow us to throw InterruptedException, so we process it later
     Thread.currentThread().interrupt();
   }
 }
Esempio n. 3
0
 public void start() {
   onStartBuilding();
   startTime = System.currentTimeMillis();
   try {
     sync();
     listener.setSideOutputStream(log);
   } catch (IOException e) {
     e.printStackTrace();
   }
 }
Esempio n. 4
0
 public void end() {
   if (result == null) setResult(Result.SUCCESS);
   onEndBuilding();
   duration += System.currentTimeMillis() - startTime;
   parentBuild.notifyModuleBuild(MavenBuild.this);
   try {
     sync();
     listener.setSideOutputStream(null);
     save();
   } catch (IOException e) {
     e.printStackTrace();
   }
 }