You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by mi...@apache.org on 2020/09/26 19:12:14 UTC
[httpcomponents-core] branch HTTPCORE-632 created (now bb32e60)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch HTTPCORE-632
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git.
at bb32e60 HTTPCORE-632: version.properties contains non-interpolated value
This branch includes the following new commits:
new bb32e60 HTTPCORE-632: version.properties contains non-interpolated value
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[httpcomponents-core] 01/01: HTTPCORE-632: version.properties
contains non-interpolated value
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch HTTPCORE-632
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
commit bb32e607254ab8c69dcbea4e89fb26878e2b916f
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat Sep 26 21:09:24 2020 +0200
HTTPCORE-632: version.properties contains non-interpolated value
Remove the non-reproducible timestamp as well as deprecate the field and
getter for this property.
---
.../java/org/apache/hc/core5/util/VersionInfo.java | 22 ++++++++--------------
.../org/apache/hc/core5/version.properties | 6 ++----
2 files changed, 10 insertions(+), 18 deletions(-)
diff --git a/httpcore5/src/main/java/org/apache/hc/core5/util/VersionInfo.java b/httpcore5/src/main/java/org/apache/hc/core5/util/VersionInfo.java
index 1080bc3..bf7636f 100644
--- a/httpcore5/src/main/java/org/apache/hc/core5/util/VersionInfo.java
+++ b/httpcore5/src/main/java/org/apache/hc/core5/util/VersionInfo.java
@@ -58,6 +58,10 @@ public class VersionInfo {
// the property names
public final static String PROPERTY_MODULE = "info.module";
public final static String PROPERTY_RELEASE = "info.release";
+ /**
+ * @deprecated This will be removed in 6.0.
+ */
+ @Deprecated
public final static String PROPERTY_TIMESTAMP = "info.timestamp";
@@ -132,7 +136,9 @@ public class VersionInfo {
* This data is read from the version information for the package.
*
* @return the timestamp, never {@code null}
+ * @deprecated This will be removed in 6.0.
*/
+ @Deprecated
public final String getTimestamp() {
return infoTimestamp;
}
@@ -170,9 +176,6 @@ public class VersionInfo {
if (!UNAVAILABLE.equals(infoRelease)) {
sb.append(':').append(infoRelease);
}
- if (!UNAVAILABLE.equals(infoTimestamp)) {
- sb.append(':').append(infoTimestamp);
- }
sb.append(')');
@@ -263,7 +266,6 @@ public class VersionInfo {
Args.notNull(pckg, "Package identifier");
String module = null;
String release = null;
- String timestamp = null;
if (info != null) {
module = (String) info.get(PROPERTY_MODULE);
@@ -273,17 +275,9 @@ public class VersionInfo {
release = (String) info.get(PROPERTY_RELEASE);
if ((release != null) && ((release.length() < 1) ||
- (release.equals("${pom.version}")))) {
+ (release.equals("${project.version}")))) {
release = null;
}
-
- timestamp = (String) info.get(PROPERTY_TIMESTAMP);
- if ((timestamp != null) &&
- ((timestamp.length() < 1) ||
- (timestamp.equals("${mvn.timestamp}")))
- ) {
- timestamp = null;
- }
} // if info
String clsldrstr = null;
@@ -291,7 +285,7 @@ public class VersionInfo {
clsldrstr = clsldr.toString();
}
- return new VersionInfo(pckg, module, release, timestamp, clsldrstr);
+ return new VersionInfo(pckg, module, release, null, clsldrstr);
}
/**
diff --git a/httpcore5/src/main/resources/org/apache/hc/core5/version.properties b/httpcore5/src/main/resources/org/apache/hc/core5/version.properties
index 96f4212..29e63b1 100644
--- a/httpcore5/src/main/resources/org/apache/hc/core5/version.properties
+++ b/httpcore5/src/main/resources/org/apache/hc/core5/version.properties
@@ -16,7 +16,5 @@
# specific language governing permissions and limitations
# under the License.
#
-info.module = httpcore5
-info.release = ${pom.version}
-info.timestamp = ${mvn.timestamp}
-# timestamp requires Maven 2.1
+info.module = ${project.artifactId}
+info.release = ${project.version}