mirror of https://github.com/apache/maven.git
[MNG-6352] - Printout version information at the end of the build
This commit is contained in:
parent
cd34b08df1
commit
8f619acd3a
|
@ -151,13 +151,24 @@ public class ExecutionEventLogger
|
||||||
|
|
||||||
MavenExecutionResult result = session.getResult();
|
MavenExecutionResult result = session.getResult();
|
||||||
|
|
||||||
for ( MavenProject project : session.getProjects() )
|
List<MavenProject> projects = session.getProjects();
|
||||||
|
MavenProject lastProject = projects.get( projects.size() - 1 );
|
||||||
|
MavenProject topProject = session.getTopLevelProject();
|
||||||
|
|
||||||
|
for ( MavenProject project : projects )
|
||||||
{
|
{
|
||||||
StringBuilder buffer = new StringBuilder( 128 );
|
StringBuilder buffer = new StringBuilder( 128 );
|
||||||
|
|
||||||
buffer.append( project.getName() );
|
buffer.append( project.getName() );
|
||||||
buffer.append( ' ' );
|
buffer.append( ' ' );
|
||||||
|
|
||||||
|
if ( topProject.equals( project ) || lastProject.equals( project )
|
||||||
|
|| !topProject.getVersion().equals( project.getVersion() ) )
|
||||||
|
{
|
||||||
|
buffer.append( project.getVersion() );
|
||||||
|
buffer.append( ' ' );
|
||||||
|
}
|
||||||
|
|
||||||
if ( buffer.length() <= MAX_PROJECT_NAME_LENGTH )
|
if ( buffer.length() <= MAX_PROJECT_NAME_LENGTH )
|
||||||
{
|
{
|
||||||
while ( buffer.length() < MAX_PROJECT_NAME_LENGTH )
|
while ( buffer.length() < MAX_PROJECT_NAME_LENGTH )
|
||||||
|
|
Loading…
Reference in New Issue