mirror of https://github.com/apache/maven.git
Fix: mng2562 - timestamp
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@695241 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6221dfb9e6
commit
180bf37d84
|
@ -49,14 +49,8 @@ import org.codehaus.plexus.logging.console.ConsoleLogger;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Properties;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public class DefaultBuildExtensionScanner
|
public class DefaultBuildExtensionScanner
|
||||||
implements BuildExtensionScanner, LogEnabled
|
implements BuildExtensionScanner, LogEnabled
|
||||||
|
@ -163,11 +157,20 @@ public class DefaultBuildExtensionScanner
|
||||||
|
|
||||||
config.setExecutionProperties( execProps );
|
config.setExecutionProperties( execProps );
|
||||||
|
|
||||||
|
//INTERPOLATION
|
||||||
List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
|
List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
|
||||||
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( config.getExecutionProperties(),
|
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( config.getExecutionProperties(),
|
||||||
PomInterpolatorTag.SYSTEM_PROPERTIES.name()));
|
PomInterpolatorTag.SYSTEM_PROPERTIES.name()));
|
||||||
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( config.getUserProperties(),
|
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( config.getUserProperties(),
|
||||||
PomInterpolatorTag.USER_PROPERTIES.name()));
|
PomInterpolatorTag.USER_PROPERTIES.name()));
|
||||||
|
if(config.getBuildStartTime() != null)
|
||||||
|
{
|
||||||
|
interpolatorProperties.add(new InterpolatorProperty("${build.timestamp}",
|
||||||
|
new SimpleDateFormat("yyyyMMdd-hhmm").format( config.getBuildStartTime() ),
|
||||||
|
PomInterpolatorTag.PROJECT_PROPERTIES.name()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
model = PomClassicTransformer.interpolateModel( model, interpolatorProperties, modelPom.getParentFile());
|
model = PomClassicTransformer.interpolateModel( model, interpolatorProperties, modelPom.getParentFile());
|
||||||
|
|
||||||
grabManagedPluginsWithExtensionsFlagTurnedOn( model, managedPluginsWithExtensionsFlag );
|
grabManagedPluginsWithExtensionsFlagTurnedOn( model, managedPluginsWithExtensionsFlag );
|
||||||
|
|
|
@ -64,11 +64,8 @@ import java.io.Reader;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.io.Writer;
|
import java.io.Writer;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -538,6 +535,13 @@ public class DefaultMavenProjectBuilder
|
||||||
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( config.getUserProperties(),
|
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( config.getUserProperties(),
|
||||||
PomInterpolatorTag.USER_PROPERTIES.name()));
|
PomInterpolatorTag.USER_PROPERTIES.name()));
|
||||||
|
|
||||||
|
if(config.getBuildStartTime() != null)
|
||||||
|
{
|
||||||
|
interpolatorProperties.add(new InterpolatorProperty("${build.timestamp}",
|
||||||
|
new SimpleDateFormat("yyyyMMdd-hhmm").format( config.getBuildStartTime() ),
|
||||||
|
PomInterpolatorTag.PROJECT_PROPERTIES.name()));
|
||||||
|
}
|
||||||
|
|
||||||
MavenProject mavenProject;
|
MavenProject mavenProject;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue