From 41c3e683f7956dcf2725211d26cf7c758a12f6f6 Mon Sep 17 00:00:00 2001 From: Cheng Pan <379377944@qq.com> Date: Wed, 21 Apr 2021 00:54:04 +0800 Subject: [PATCH] [KYUUBI #547] [BUILD] Add build timestamp and support scala.binary.version specific code ### _Why are the changes needed?_ This change added `module.build.timestamp` and `local.build.timestamp` to maven properties, so we can use it in later for make dist. This change also add `src/main/scala-${scala.binary.version}` to maven sources files, so we can write `scala.binary.version` specific code to the codebase. ### _How was this patch tested?_ - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible - [ ] Add screenshots for manual tests if appropriate - [x] [Run test](https://kyuubi.readthedocs.io/en/latest/tools/testing.html#running-tests) locally before make a pull request Closes #547 from pan3793/build. Closes #547 10873a7 [Cheng Pan] fix property name 8c681dd [Cheng Pan] enable build-helper-maven-plugin 4cc71ce [Cheng Pan] [BUILD] Add build timestamp Authored-by: Cheng Pan <379377944@qq.com> Signed-off-by: fwang12 --- pom.xml | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/pom.xml b/pom.xml index 270cd44cb..8235d9880 100644 --- a/pom.xml +++ b/pom.xml @@ -89,6 +89,7 @@ ${project.build.directory}/scala-${scala.binary.version}/jars 3.0.0 + 3.2.0 3.8.1 4.3.0 @@ -105,6 +106,10 @@ 1.6.0 1.6.0 0.13 + + + yyyy-MM-dd HH:mm:ss z + org.apache.kyuubi.shade @@ -1056,6 +1061,52 @@ ${maven.plugin.antrun.version} + + org.codehaus.mojo + build-helper-maven-plugin + ${maven.plugin.build.helper.version} + + + module-timestamp-property + validate + + timestamp-property + + + module.build.timestamp + ${maven.build.timestamp.format} + current + Asia/Shanghai + + + + local-timestamp-property + validate + + timestamp-property + + + local.build.timestamp + ${maven.build.timestamp.format} + build + Asia/Shanghai + + + + add-scala-sources + generate-sources + + add-source + + + + src/main/scala-${scala.binary.version} + + + + + + org.apache.maven.plugins maven-compiler-plugin @@ -1352,6 +1403,11 @@ + + org.codehaus.mojo + build-helper-maven-plugin + + net.alchim31.maven scala-maven-plugin