mirror of https://github.com/apache/maven.git
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:
parent
790f8f8fed
commit
125c19fb3a
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue