You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/07/03 22:45:51 UTC

[GitHub] [iceberg] kbendick commented on pull request #5186: Build / Core - Add a Gradle task to create a build properties file for core module and accessor class

kbendick commented on PR #5186:
URL: https://github.com/apache/iceberg/pull/5186#issuecomment-1173185258

   `version.properties` is added to core jar and thus runtime jars:
   ```bash
   $ jar -tvf  spark/v3.3/spark-runtime/build/libs/iceberg-spark-runtime-3.3_2.12-0.14.0-SNAPSHOT.jar | grep version.properties
      291 Fri Feb 01 00:00:00 PST 1980 org/apache/iceberg/util/version.properties
      903 Fri Feb 01 00:00:00 PST 1980 org/apache/hc/client5/version.properties
      839 Fri Feb 01 00:00:00 PST 1980 org/apache/hc/core5/version.properties
   ```
   
   `version.properties` is accessible at runtime:
   ```scala
   $ spark-shell --jars spark/v3.3/spark-runtime/build/libs/iceberg-spark-runtime-3.3_2.12-0.14.0-SNAPSHOT.jar
   
   scala> import org.apache.iceberg.util.VersionPropertiesUtil;
   import org.apache.iceberg.util.VersionPropertiesUtil
   
   scala> VersionPropertiesUtil.gitHashFull()
   res0: String = aceda8990a62e0b36a895cb5f5d49c4ee8d82d6f
   
   scala> VersionPropertiesUtil.gitHash()
   res1: String = aceda8990a
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org