mirror of https://github.com/apache/maven.git
PR: MNG-914
set start time to the start of the request instead of the start of the executor to account for parent pom resolution git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@307300 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ac3e83d61c
commit
552ab6d2b3
|
@ -505,7 +505,7 @@ public class DefaultMaven
|
|||
{
|
||||
return new MavenSession( container, request.getSettings(), request.getLocalRepository(),
|
||||
request.getEventDispatcher(), rpm, request.getGoals(), request.getBaseDirectory(),
|
||||
request.getExecutionProperties() );
|
||||
request.getExecutionProperties(), request.getStartTime() );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.apache.maven.monitor.event.EventMonitor;
|
|||
import org.apache.maven.profiles.ProfileManager;
|
||||
import org.apache.maven.settings.Settings;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
|
@ -59,13 +60,11 @@ public class DefaultMavenExecutionRequest
|
|||
|
||||
private final Properties executionProperties;
|
||||
|
||||
public DefaultMavenExecutionRequest( ArtifactRepository localRepository,
|
||||
Settings settings,
|
||||
EventDispatcher eventDispatcher,
|
||||
List goals,
|
||||
String baseDirectory,
|
||||
ProfileManager globalProfileManager,
|
||||
Properties executionProperties )
|
||||
private final Date startTime;
|
||||
|
||||
public DefaultMavenExecutionRequest( ArtifactRepository localRepository, Settings settings,
|
||||
EventDispatcher eventDispatcher, List goals, String baseDirectory,
|
||||
ProfileManager globalProfileManager, Properties executionProperties )
|
||||
{
|
||||
this.localRepository = localRepository;
|
||||
|
||||
|
@ -80,6 +79,8 @@ public class DefaultMavenExecutionRequest
|
|||
this.globalProfileManager = globalProfileManager;
|
||||
|
||||
this.executionProperties = executionProperties;
|
||||
|
||||
this.startTime = new Date();
|
||||
}
|
||||
|
||||
public Settings getSettings()
|
||||
|
@ -175,4 +176,9 @@ public class DefaultMavenExecutionRequest
|
|||
{
|
||||
return globalProfileManager;
|
||||
}
|
||||
|
||||
public Date getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import org.apache.maven.monitor.event.EventMonitor;
|
|||
import org.apache.maven.profiles.ProfileManager;
|
||||
import org.apache.maven.settings.Settings;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
|
@ -66,4 +67,6 @@ public interface MavenExecutionRequest
|
|||
ProfileManager getGlobalProfileManager();
|
||||
|
||||
Properties getExecutionProperties();
|
||||
|
||||
Date getStartTime();
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ import org.apache.maven.settings.Settings;
|
|||
import org.codehaus.plexus.PlexusContainer;
|
||||
import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
@ -53,14 +54,11 @@ public class MavenSession
|
|||
|
||||
private final Properties executionProperties;
|
||||
|
||||
public MavenSession( PlexusContainer container,
|
||||
Settings settings,
|
||||
ArtifactRepository localRepository,
|
||||
EventDispatcher eventDispatcher,
|
||||
ReactorManager reactorManager,
|
||||
List goals,
|
||||
String executionRootDir,
|
||||
Properties executionProperties )
|
||||
private final Date startTime;
|
||||
|
||||
public MavenSession( PlexusContainer container, Settings settings, ArtifactRepository localRepository,
|
||||
EventDispatcher eventDispatcher, ReactorManager reactorManager, List goals,
|
||||
String executionRootDir, Properties executionProperties, Date startTime )
|
||||
{
|
||||
this.container = container;
|
||||
|
||||
|
@ -77,6 +75,8 @@ public class MavenSession
|
|||
this.executionRootDir = executionRootDir;
|
||||
|
||||
this.executionProperties = executionProperties;
|
||||
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Map getPluginContext( PluginDescriptor pluginDescriptor, MavenProject project )
|
||||
|
@ -161,4 +161,9 @@ public class MavenSession
|
|||
{
|
||||
return usingPOMsFromFilesystem;
|
||||
}
|
||||
|
||||
public Date getStartTime()
|
||||
{
|
||||
return startTime;
|
||||
}
|
||||
}
|
|
@ -121,7 +121,7 @@ public class DefaultLifecycleExecutor
|
|||
|
||||
MavenExecutionResponse response = new MavenExecutionResponse();
|
||||
|
||||
response.setStart( new Date() );
|
||||
response.setStart( session.getStartTime() );
|
||||
|
||||
try
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue