Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Fedorenko2011-05-05 12:47:59 -0400
committerIgor Fedorenko2011-05-05 12:47:59 -0400
commit875ea24285fbaac791725434bba7db05cc2fe184 (patch)
tree9ffa57fad0cc49d34302bb35754e41773fc992b7
parenta1fb4d88391ce6cbc535e979d70716cab5ebe6c5 (diff)
downloadm2e-core-875ea24285fbaac791725434bba7db05cc2fe184.tar.gz
m2e-core-875ea24285fbaac791725434bba7db05cc2fe184.tar.xz
m2e-core-875ea24285fbaac791725434bba7db05cc2fe184.zip
m2e does not expand ${maven.build.timestamp}
Signed-off-by: Igor Fedorenko <igor@ifedorenko.com>
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java4
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java5
-rw-r--r--org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java1
3 files changed, 9 insertions, 1 deletions
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
index 98797939..608f9ee3 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/embedder/MavenImpl.java
@@ -23,6 +23,7 @@ import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
+import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Properties;
@@ -186,6 +187,9 @@ public class MavenImpl implements IMaven, IMavenConfigurationChangeListener {
public MavenExecutionRequest createExecutionRequest(IProgressMonitor monitor) throws CoreException {
MavenExecutionRequest request = new DefaultMavenExecutionRequest();
+
+ request.setStartTime( new Date() );
+
if(mavenConfiguration.getGlobalSettingsFile() != null) {
request.setGlobalSettingsFile(new File(mavenConfiguration.getGlobalSettingsFile()));
}
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java
index 9c2dd401..0964eb32 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/lifecyclemapping/LifecycleMappingFactory.java
@@ -532,7 +532,10 @@ public class LifecycleMappingFactory {
}
private static MavenExecutionRequest newMavenExecutionRequest(MavenExecutionRequest templateRequest) {
- return DefaultMavenExecutionRequest.copy(templateRequest); // TODO ain't nice
+ // TODO ain't nice
+ MavenExecutionRequest copy = DefaultMavenExecutionRequest.copy(templateRequest);
+ copy.setStartTime(templateRequest.getStartTime());
+ return copy;
}
public static AbstractProjectConfigurator createProjectConfigurator(IPluginExecutionMetadata metadata) {
diff --git a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
index 1aeb1fd8..6afea342 100644
--- a/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
+++ b/org.eclipse.m2e.core/src/org/eclipse/m2e/core/internal/project/registry/ProjectRegistryManager.java
@@ -615,6 +615,7 @@ public class ProjectRegistryManager {
protected MavenExecutionRequest getConfiguredExecutionRequest(DependencyResolutionContext context,
IProjectRegistry state, IFile pom, ResolverConfiguration resolverConfiguration) throws CoreException {
MavenExecutionRequest mavenRequest = DefaultMavenExecutionRequest.copy(context.getExecutionRequest());
+ mavenRequest.setStartTime(context.getExecutionRequest().getStartTime());
configureExecutionRequest(mavenRequest, state, pom, resolverConfiguration);
getMaven().populateDefaults(mavenRequest);
mavenRequest.setOffline(context.getRequest().isOffline());

Back to the top