mirror of https://github.com/apache/maven.git
Using props directly for the interpolator.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/branches/MNG-2766@769675 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ae9248e642
commit
a4be625de5
|
@ -255,7 +255,7 @@ public class DefaultMavenProjectBuilder
|
||||||
List<Profile> projectProfiles;
|
List<Profile> projectProfiles;
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
props.putAll(configuration.getExecutionProperties());
|
props.putAll(configuration.getExecutionProperties());
|
||||||
props.putAll(configuration.getUserProperties());
|
// props.putAll(configuration.getUserProperties());
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -407,19 +407,14 @@ public class DefaultMavenProjectBuilder
|
||||||
|
|
||||||
String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
|
String projectId = safeVersionlessKey( model.getGroupId(), model.getArtifactId() );
|
||||||
|
|
||||||
List<InterpolatorProperty> interpolatorProperties = new ArrayList<InterpolatorProperty>();
|
Properties props = new Properties(config.getExecutionProperties());
|
||||||
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( config.getExecutionProperties(), PomInterpolatorTag.EXECUTION_PROPERTIES.name() ) );
|
|
||||||
interpolatorProperties.addAll( InterpolatorProperty.toInterpolatorProperties( config.getUserProperties(), PomInterpolatorTag.USER_PROPERTIES.name() ) );
|
|
||||||
|
|
||||||
if ( config.getBuildStartTime() != null )
|
if ( config.getBuildStartTime() != null )
|
||||||
{
|
{
|
||||||
interpolatorProperties.add( new InterpolatorProperty( "${build.timestamp}", new SimpleDateFormat( "yyyyMMdd-hhmm" ).format( config.getBuildStartTime() ),
|
props.put("${build.timestamp}", new SimpleDateFormat( "yyyyMMdd-hhmm" ).format( config.getBuildStartTime() ) );
|
||||||
PomInterpolatorTag.PROJECT_PROPERTIES.name() ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
model = interpolator.interpolateDomainModel( domainModel, interpolatorProperties ).getModel();
|
model = interpolator.interpolateDomainModel( domainModel, props ).getModel();
|
||||||
}
|
}
|
||||||
catch ( IOException e )
|
catch ( IOException e )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue