This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-release.git
The following commit(s) were added to refs/heads/master by this push:
new 9a52341 [MRELEASE-1071] 0 to 9 don't disable Reproducible Builds
9a52341 is described below
commit 9a5234147934559e2df263b9d09a833d516eed7d
Author: Hervé Boutemy <[email protected]>
AuthorDate: Tue Sep 21 21:56:25 2021 +0200
[MRELEASE-1071] 0 to 9 don't disable Reproducible Builds
---
.../maven/shared/release/phase/AbstractRewritePomsPhase.java | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
index c9dc7cc..4c84541 100644
---
a/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
+++
b/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java
@@ -348,22 +348,22 @@ public abstract class AbstractRewritePomsPhase
private void rewriteBuildOutputTimestampProperty( Properties properties,
ReleaseResult result )
{
String buildOutputTimestamp = properties.getProperty(
"project.build.outputTimestamp" );
- if ( buildOutputTimestamp == null )
+ if ( buildOutputTimestamp == null || StringUtils.isEmpty(
buildOutputTimestamp ) )
{
// no Reproducible Builds output timestamp defined
return;
}
- if ( buildOutputTimestamp.length() <= 1 )
- {
- // value length == 1 means disable Reproducible Builds
- return;
- }
if ( StringUtils.isNumeric( buildOutputTimestamp ) )
{
// int representing seconds since the epoch, like SOURCE_DATE_EPOCH
buildOutputTimestamp = String.valueOf( result.getStartTime() /
1000 );
}
+ else if ( buildOutputTimestamp.length() <= 1 )
+ {
+ // value length == 1 means disable Reproducible Builds
+ return;
+ }
else
{
// ISO-8601