You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by db...@apache.org on 2020/07/29 21:44:31 UTC
[spark] branch branch-3.0 updated: [SPARK-32397][BUILD] Allow
specifying of time for build to keep time consistent between modules
This is an automated email from the ASF dual-hosted git repository.
dbtsai pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new d00e104 [SPARK-32397][BUILD] Allow specifying of time for build to keep time consistent between modules
d00e104 is described below
commit d00e1040010ac82df7e41e88314a6162b016f807
Author: Holden Karau <hk...@apple.com>
AuthorDate: Wed Jul 29 21:39:14 2020 +0000
[SPARK-32397][BUILD] Allow specifying of time for build to keep time consistent between modules
### What changes were proposed in this pull request?
Upgrade codehaus maven build helper to allow people to specify a time during the build to avoid snapshot artifacts with different version strings.
### Why are the changes needed?
During builds of snapshots the maven may assign different versions to different artifacts based on the time each individual sub-module starts building.
The timestamp is used as part of the version string when run `maven deploy` on a snapshot build. This results in different sub-modules having different version strings.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Manual build while specifying the current time, ensured the time is consistent in the sub components.
Open question: Ideally I'd like to backport this as well since it's sort of a bug fix and while it does change a dependency version it's not one that is propagated. I'd like to hear folks thoughts about this.
Closes #29274 from holdenk/SPARK-32397-snapshot-artifact-timestamp-differences.
Authored-by: Holden Karau <hk...@apple.com>
Signed-off-by: DB Tsai <d_...@apple.com>
(cherry picked from commit 50911df08eb7a27494dc83bcec3d09701c2babfe)
Signed-off-by: DB Tsai <d_...@apple.com>
---
pom.xml | 40 +++++++++++++++++++++++++++++++++++-----
1 file changed, 35 insertions(+), 5 deletions(-)
diff --git a/pom.xml b/pom.xml
index 6c67ce4..86cdd1d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -251,6 +251,8 @@
<spark.test.webdriver.chrome.driver></spark.test.webdriver.chrome.driver>
<CodeCacheSize>1g</CodeCacheSize>
+ <!-- Needed for consistent times -->
+ <maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss z</maven.build.timestamp.format>
</properties>
<repositories>
<repository>
@@ -2344,11 +2346,39 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>3.0.0</version>
- </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.2.0</version>
+ <executions>
+ <execution>
+ <id>module-timestamp-property</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>timestamp-property</goal>
+ </goals>
+ <configuration>
+ <name>module.build.timestamp</name>
+ <pattern>${maven.build.timestamp.format}</pattern>
+ <timeSource>current</timeSource>
+ <timeZone>America/Los_Angeles</timeZone>
+ </configuration>
+ </execution>
+ <execution>
+ <id>local-timestamp-property</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>timestamp-property</goal>
+ </goals>
+ <configuration>
+ <name>local.build.timestamp</name>
+ <pattern>${maven.build.timestamp.format}</pattern>
+ <timeSource>build</timeSource>
+ <timeZone>America/Los_Angeles</timeZone>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org