Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-8573] maven.build.timestamp property is not available …
…during maven build
  • Loading branch information
olamy committed Mar 17, 2011
1 parent a1e0ac0 commit d4f8020
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -22,8 +22,10 @@
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import java.util.StringTokenizer;
Expand Down Expand Up @@ -86,6 +88,8 @@ public class DefaultMavenExecutionRequestBuilder
private PlexusContainer plexusContainer;

private DefaultSecDispatcher dispatcher;

static final String DEFAULT_BUILD_TIMESTAMP_FORMAT = "yyyyMMdd-HHmm";

This comment has been minimized.

Copy link
@batkinson

batkinson Feb 18, 2013

Member

This doesn't respect maven.build.timestamp.format, which means Jenkins-Maven won't act like straight Maven.


public void initialize()
throws InitializationException
Expand Down Expand Up @@ -342,6 +346,7 @@ static void populateProperties( CommandLine commandLine, Properties systemProper
}

systemProperties.putAll( System.getProperties() );
systemProperties.put( "maven.build.timestamp", new SimpleDateFormat(DEFAULT_BUILD_TIMESTAMP_FORMAT).format( new Date() ) );
}

private static void setCliProperty( String property, Properties properties )
Expand Down

1 comment on commit d4f8020

@abisain
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to fix this? This code is ignoring the timestamp.format specified by the user in pom files.

Please sign in to comment.