This is an automated email from the ASF dual-hosted git repository.
iemejia pushed a commit to branch branch-1.11
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/branch-1.11 by this push:
new d6a0d0a79 AVRO-3586: Pin output timestamp to make the Java build
reproducible (#1783)
d6a0d0a79 is described below
commit d6a0d0a790274de27b2cfde07d14151a4a327a96
Author: Ismaël Mejía <[email protected]>
AuthorDate: Mon Jul 25 11:54:01 2022 +0200
AVRO-3586: Pin output timestamp to make the Java build reproducible (#1783)
* AVRO-3586: Update maven plugins and fix checkstyle issue
* AVRO-3586: Pin output timestamp to make the Java build reproducible
---
.github/workflows/test-lang-java.yml | 4 ++
lang/java/pom.xml | 1 -
.../main/java/org/apache/trevni/InputBuffer.java | 2 +-
pom.xml | 57 +++++++++++++++++++---
4 files changed, 55 insertions(+), 9 deletions(-)
diff --git a/.github/workflows/test-lang-java.yml
b/.github/workflows/test-lang-java.yml
index 934379e26..01b9a597e 100644
--- a/.github/workflows/test-lang-java.yml
+++ b/.github/workflows/test-lang-java.yml
@@ -149,3 +149,7 @@ jobs:
- name: Run Interop Tests
working-directory: lang/java/ipc
run: mvn -B test -P interop-data-test
+
+ - name: Test Reproducible Build
+ working-directory: .
+ run: mvn clean verify -DskipTests artifact:compare
diff --git a/lang/java/pom.xml b/lang/java/pom.xml
index a11fe3367..841b9d08d 100644
--- a/lang/java/pom.xml
+++ b/lang/java/pom.xml
@@ -209,7 +209,6 @@
<encoding>UTF-8</encoding>
<additionalJOption>-Xdoclint:none</additionalJOption>
<detectOfflineLinks>false</detectOfflineLinks>
- <notimestamp>true</notimestamp>
</configuration>
</plugin>
<plugin>
diff --git
a/lang/java/trevni/core/src/main/java/org/apache/trevni/InputBuffer.java
b/lang/java/trevni/core/src/main/java/org/apache/trevni/InputBuffer.java
index 2234a1fc2..526bb46bc 100644
--- a/lang/java/trevni/core/src/main/java/org/apache/trevni/InputBuffer.java
+++ b/lang/java/trevni/core/src/main/java/org/apache/trevni/InputBuffer.java
@@ -145,7 +145,7 @@ class InputBuffer {
bitCount++;
if (bitCount == 8)
bitCount = 0;
- return bit == 0 ? false : true;
+ return bit != 0;
}
public int readLength() throws IOException {
diff --git a/pom.xml b/pom.xml
index cafbf59ef..de3af914a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
- <version>23</version>
+ <version>27</version>
</parent>
<groupId>org.apache.avro</groupId>
@@ -45,16 +45,25 @@
<main.basedir>${project.basedir}</main.basedir>
<avro.distDir>dist</avro.distDir>
<avro.docDir>build/avro-doc-${project.version}/api</avro.docDir>
+
<!-- plugin versions -->
- <antrun-plugin.version>3.0.0</antrun-plugin.version>
+ <apache-rat-plugin.version>0.14</apache-rat-plugin.version>
<checkstyle-plugin.version>3.1.2</checkstyle-plugin.version>
- <checkstyle.version>8.42</checkstyle.version>
- <enforcer-plugin.version>3.0.0-M3</enforcer-plugin.version>
- <maven-plugin-plugin.version>3.6.1</maven-plugin-plugin.version>
+ <checkstyle.version>9.3</checkstyle.version>
+ <enforcer-plugin.version>3.1.0</enforcer-plugin.version>
+ <extra-enforcer-rules.version>1.6.1</extra-enforcer-rules.version>
+ <maven-antrun-plugin.version>3.1.0</maven-antrun-plugin.version>
+ <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
+ <maven-javadoc-plugin.version>3.4.0</maven-javadoc-plugin.version>
+ <maven-plugin-plugin.version>3.6.4</maven-plugin-plugin.version>
+ <maven-shade-plugin.version>3.3.0</maven-shade-plugin.version>
+ <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
<plugin-tools-javadoc.version>3.5</plugin-tools-javadoc.version>
- <extra-enforcer-rules.version>1.3</extra-enforcer-rules.version>
- <spotless-maven-plugin.version>2.19.1</spotless-maven-plugin.version>
+ <spotless-maven-plugin.version>2.23.0</spotless-maven-plugin.version>
<surefire.version>3.0.0-M5</surefire.version>
+
+ <!-- Pin output timestamp to make the Java build reproducible -->
+ <project.build.outputTimestamp>10</project.build.outputTimestamp>
</properties>
<modules>
@@ -106,11 +115,44 @@
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>${maven-antrun-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <version>${maven-gpg-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${maven-javadoc-plugin.version}</version>
+ <configuration>
+ <notimestamp>true</notimestamp>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>${maven-plugin-plugin.version}</version>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>${maven-shade-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>${maven-source-plugin.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>${apache-rat-plugin.version}</version>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
@@ -314,6 +356,7 @@
<!-- version control files -->
<!-- may not be in the root folder if using git-svn -->
<exclude>**/.git/**</exclude>
+ <exclude>**/.gitattributes</exclude>
<exclude>**/.gitignore</exclude>
<exclude>**/.gitmodules</exclude>
<!-- Docsy -->