mirror of https://github.com/apache/maven.git
[MNG-6302] display progress at end of "Building" line
This commit is contained in:
parent
4d49d3b05b
commit
f5f76c70e1
|
@ -264,19 +264,28 @@ public void projectStarted( ExecutionEvent event )
|
||||||
logger.info( "" );
|
logger.info( "" );
|
||||||
infoLine( '-' );
|
infoLine( '-' );
|
||||||
|
|
||||||
infoMain( "Building " + event.getProject().getName() + " " + event.getProject().getVersion() );
|
String building = "Building " + event.getProject().getName() + " " + event.getProject().getVersion();
|
||||||
|
|
||||||
infoLine( '-' );
|
if ( totalProjects <= 1 )
|
||||||
|
|
||||||
if ( totalProjects > 1 )
|
|
||||||
{
|
{
|
||||||
|
infoMain( building );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// display progress [i/n]
|
||||||
int number;
|
int number;
|
||||||
synchronized ( this )
|
synchronized ( this )
|
||||||
{
|
{
|
||||||
number = ++currentVisitedProjectCount;
|
number = ++currentVisitedProjectCount;
|
||||||
}
|
}
|
||||||
infoMain( "Module " + number + "/" + totalProjects );
|
String progress = " [" + number + '/' + totalProjects + ']';
|
||||||
|
|
||||||
|
int pad = LINE_LENGTH - building.length() - progress.length();
|
||||||
|
|
||||||
|
infoMain( building + ( ( pad > 0 ) ? chars( ' ', pad ) : "" ) + progress );
|
||||||
} // else what's the point
|
} // else what's the point
|
||||||
|
|
||||||
|
infoLine( '-' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue