You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by gn...@apache.org on 2022/10/20 21:06:16 UTC
[maven] branch master updated: Restore compatibility with 3.x (#836)
This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/master by this push:
new 18eff3bae Restore compatibility with 3.x (#836)
18eff3bae is described below
commit 18eff3baeb899ddd27b34635c8f0d7e47f5c027b
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Thu Oct 20 23:06:06 2022 +0200
Restore compatibility with 3.x (#836)
* Restore compatibility with 3.x
* Deprecate the old constructor
---
.../maven/model/interpolation/MavenBuildTimestamp.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/MavenBuildTimestamp.java b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/MavenBuildTimestamp.java
index e609c777f..3f6736157 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/MavenBuildTimestamp.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/MavenBuildTimestamp.java
@@ -23,6 +23,7 @@ import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Map;
+import java.util.Properties;
import java.util.TimeZone;
/**
@@ -54,6 +55,17 @@ public class MavenBuildTimestamp
this( time, properties != null ? properties.get( BUILD_TIMESTAMP_FORMAT_PROPERTY ) : null );
}
+ /**
+ *
+ * @deprecated Use {@link #MavenBuildTimestamp(Date, Map)} or extract the format and pass it
+ * to {@link #MavenBuildTimestamp(Date, String)} instead.
+ */
+ @Deprecated
+ public MavenBuildTimestamp( Date time, Properties properties )
+ {
+ this( time, properties != null ? properties.getProperty( BUILD_TIMESTAMP_FORMAT_PROPERTY ) : null );
+ }
+
public MavenBuildTimestamp( Date time, String timestampFormat )
{
if ( timestampFormat == null )