PR: MNG-1265

Submitted By: Allan Ramirez
Reviewed By: John Casey

Applied patch, which will add "built on" timestamp to the --version output.

NOTE: I did not apply the portion of the patch related to mboot, since the bootstrap has been redone. This may need to be added back into the bootstrap later.


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@354702 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-12-07 04:28:29 +00:00
parent 790f8f8fed
commit 125c19fb3a
1 changed files with 10 additions and 2 deletions

View File

@ -501,8 +501,16 @@ public class MavenCli
resourceAsStream = MavenCli.class.getClassLoader().getResourceAsStream( resourceAsStream = MavenCli.class.getClassLoader().getResourceAsStream(
"META-INF/maven/org.apache.maven/maven-core/pom.properties" ); "META-INF/maven/org.apache.maven/maven-core/pom.properties" );
properties.load( resourceAsStream ); properties.load( resourceAsStream );
System.out.println( "Maven version: " + properties.getProperty( "version", "unknown" ) ); if( properties.getProperty( "builtOn" ) != null )
{
System.out.println( "Maven version: " + properties.getProperty( "version", "unknown" )
+ " built on " + properties.getProperty( "builtOn" ) );
}
else
{
System.out.println( "Maven version: " + properties.getProperty( "version", "unknown" ) );
}
} }
catch ( IOException e ) catch ( IOException e )
{ {