diff --git a/dev/release/01-prepare-test.rb b/dev/release/01-prepare-test.rb index 8fb23f45f0f..f4bf01f1f6f 100644 --- a/dev/release/01-prepare-test.rb +++ b/dev/release/01-prepare-test.rb @@ -264,18 +264,17 @@ def test_version_pre_tag end Dir.glob("java/**/pom.xml") do |path| - version = "#{@snapshot_version}" - lines = File.readlines(path, chomp: true) - target_lines = lines.grep(/#{Regexp.escape(version)}/) - hunks = [] - target_lines.each do |line| - new_line = line.gsub(@snapshot_version) do - @release_version + hunks = generate_hunks(File.readlines(path, chomp: true)) do |line| + if line.include?("#{@snapshot_version}") + new_line = line.gsub(@snapshot_version) do + @release_version + end + [line, new_line] + elsif line.include?("") + [line, normalize_pom_xml_output_timestamp(line)] + else + [nil, nil] end - hunks << [ - "-#{line}", - "+#{new_line}", - ] end expected_changes << {hunks: hunks, path: path} end diff --git a/dev/release/post-11-bump-versions-test.rb b/dev/release/post-11-bump-versions-test.rb index 78d9320bfb3..fd8a74039de 100644 --- a/dev/release/post-11-bump-versions-test.rb +++ b/dev/release/post-11-bump-versions-test.rb @@ -262,37 +262,19 @@ def test_version_post_tag end import_path = "github.com/apache/arrow/go/v#{@snapshot_major_version}" - hunks = [] if release_type == :major - lines = File.readlines(path, chomp: true) - target_lines = lines.each_with_index.select do |line, i| - line.include?(import_path) - end - next if target_lines.empty? - n_context_lines = 3 # The default of Git's diff.context - target_hunks = [[target_lines.first[0]]] - previous_i = target_lines.first[1] - target_lines[1..-1].each do |line, i| - if i - previous_i < n_context_lines - target_hunks.last << line - else - target_hunks << [line] - end - previous_i = i - end - target_hunks.each do |lines| - hunk = [] - lines.each do |line,| - hunk << "-#{line}" - end - lines.each do |line| + hunks = generate_hunks(File.readlines(path, chomp: true)) do |line| + if line.include?(import_path) new_line = line.gsub("v#{@snapshot_major_version}") do "v#{@next_major_version}" end - hunk << "+#{new_line}" + [line, new_line] + else + [nil, nil] end - hunks << hunk end + else + hunks = [] end if path == "go/parquet/writer_properties.go" hunks << [ @@ -305,18 +287,17 @@ def test_version_post_tag end Dir.glob("java/**/pom.xml") do |path| - version = "#{@snapshot_version}" - lines = File.readlines(path, chomp: true) - target_lines = lines.grep(/#{Regexp.escape(version)}/) - hunks = [] - target_lines.each do |line| - new_line = line.gsub(@snapshot_version) do - @next_snapshot_version + hunks = generate_hunks(File.readlines(path, chomp: true)) do |line| + if line.include?("#{@snapshot_version}") + new_line = line.gsub(@snapshot_version) do + @next_snapshot_version + end + [line, new_line] + elsif line.include?("") + [line, normalize_pom_xml_output_timestamp(line)] + else + [nil, nil] end - hunks << [ - "-#{line}", - "+#{new_line}", - ] end expected_changes << {hunks: hunks, path: path} end diff --git a/dev/release/test-helper.rb b/dev/release/test-helper.rb index 3b2c3aa6e58..6d420bb2bdd 100644 --- a/dev/release/test-helper.rb +++ b/dev/release/test-helper.rb @@ -83,15 +83,59 @@ def parse_patch(patch) when /\A@@/ in_hunk = true diffs.last[:hunks] << [] - when /\A[-+]/ + when /\A-/ next unless in_hunk diffs.last[:hunks].last << line.chomp + when /\A\+/ + next unless in_hunk + diffs.last[:hunks].last << normalize_added_line(line.chomp) end end diffs.sort_by do |diff| diff[:path] end end + + def generate_hunks(lines) + git_diff_context = 3 # The default of Git's diff.context + max_lines_for_same_hunk = git_diff_context * 2 + 1 + previous_i = nil + grouped_change_blocks = [] + lines.each_with_index do |line, i| + deleted, added = yield(line) + next if deleted.nil? and added.nil? + if previous_i.nil? or (i - previous_i) > max_lines_for_same_hunk + grouped_change_blocks << [] + end + if i - 1 != previous_i + grouped_change_blocks.last << [] + end + grouped_change_blocks.last.last << [deleted, added] + previous_i = i + end + grouped_change_blocks.collect do |change_blocks| + hunk = [] + change_blocks.each do |continuous_changes| + continuous_changes.each do |deleted, _| + hunk << "-#{deleted}" if deleted + end + continuous_changes.each do |_, added| + hunk << "+#{added}" if added + end + end + hunk + end + end + + def normalize_pom_xml_output_timestamp(line) + line.gsub(/.+?1980-01-01T00:00:02Z<" + end + end + + def normalize_added_line(line) + normalize_pom_xml_output_timestamp(line) + end end module VersionDetectable diff --git a/java/adapter/avro/pom.xml b/java/adapter/avro/pom.xml index 6644748b5e5..1b020ab2845 100644 --- a/java/adapter/avro/pom.xml +++ b/java/adapter/avro/pom.xml @@ -25,6 +25,10 @@ (Contrib/Experimental) A library for converting Avro data to Arrow data. http://maven.apache.org + + 1980-01-01T00:00:02Z + + diff --git a/java/adapter/jdbc/pom.xml b/java/adapter/jdbc/pom.xml index b6c450ecd32..22a9aee7505 100644 --- a/java/adapter/jdbc/pom.xml +++ b/java/adapter/jdbc/pom.xml @@ -25,6 +25,10 @@ (Contrib/Experimental)A library for converting JDBC data to Arrow data. http://maven.apache.org + + 1980-01-01T00:00:02Z + + diff --git a/java/algorithm/pom.xml b/java/algorithm/pom.xml index 25669010d2d..0da7b8573b1 100644 --- a/java/algorithm/pom.xml +++ b/java/algorithm/pom.xml @@ -20,6 +20,10 @@ Arrow Algorithms (Experimental/Contrib) A collection of algorithms for working with ValueVectors. + + 1980-01-01T00:00:02Z + + org.apache.arrow diff --git a/java/bom/pom.xml b/java/bom/pom.xml index 2406886222d..f4184b446bc 100644 --- a/java/bom/pom.xml +++ b/java/bom/pom.xml @@ -15,7 +15,7 @@ org.apache apache - 18 + 31 org.apache.arrow @@ -26,6 +26,7 @@ Arrow Bill of Materials + 3.5.0 diff --git a/java/c/pom.xml b/java/c/pom.xml index ffd41b62dd6..d9d8a2e29a0 100644 --- a/java/c/pom.xml +++ b/java/c/pom.xml @@ -22,6 +22,7 @@ Java implementation of C Data Interface jar + 1980-01-01T00:00:02Z ./build diff --git a/java/compression/pom.xml b/java/compression/pom.xml index 0db3fae4653..99b54a8a12f 100644 --- a/java/compression/pom.xml +++ b/java/compression/pom.xml @@ -20,6 +20,10 @@ Arrow Compression (Experimental/Contrib) A library for working with the compression/decompression of Arrow data. + + 1980-01-01T00:00:02Z + + org.apache.arrow diff --git a/java/dataset/pom.xml b/java/dataset/pom.xml index 43b91316739..65e872bad5c 100644 --- a/java/dataset/pom.xml +++ b/java/dataset/pom.xml @@ -24,6 +24,7 @@ Java implementation of Arrow Dataset API/Framework jar + 1980-01-01T00:00:02Z ../../../cpp/release-build/ 2.5.0 1.13.1 diff --git a/java/flight/flight-core/pom.xml b/java/flight/flight-core/pom.xml index 830caf8a282..10c78ec8a2c 100644 --- a/java/flight/flight-core/pom.xml +++ b/java/flight/flight-core/pom.xml @@ -24,6 +24,7 @@ jar + 1980-01-01T00:00:02Z 1 @@ -288,7 +289,7 @@ maven-assembly-plugin - 3.0.0 + 3.2.0 jar-with-dependencies diff --git a/java/flight/flight-integration-tests/pom.xml b/java/flight/flight-integration-tests/pom.xml index 905c8bdaf01..1d578854abc 100644 --- a/java/flight/flight-integration-tests/pom.xml +++ b/java/flight/flight-integration-tests/pom.xml @@ -24,6 +24,10 @@ Integration tests for Flight RPC. jar + + 1980-01-01T00:00:02Z + + org.apache.arrow @@ -64,7 +68,7 @@ maven-assembly-plugin - 3.0.0 + 3.2.0 jar-with-dependencies diff --git a/java/flight/flight-sql-jdbc-core/pom.xml b/java/flight/flight-sql-jdbc-core/pom.xml index 20996d7496c..ed21f40acd9 100644 --- a/java/flight/flight-sql-jdbc-core/pom.xml +++ b/java/flight/flight-sql-jdbc-core/pom.xml @@ -28,6 +28,7 @@ https://arrow.apache.org + 1980-01-01T00:00:02Z ${project.parent.groupId}:${project.parent.artifactId} ${project.parent.version} ${project.name} diff --git a/java/flight/flight-sql-jdbc-driver/pom.xml b/java/flight/flight-sql-jdbc-driver/pom.xml index 53d929afa78..f248852659a 100644 --- a/java/flight/flight-sql-jdbc-driver/pom.xml +++ b/java/flight/flight-sql-jdbc-driver/pom.xml @@ -27,6 +27,10 @@ jar https://arrow.apache.org + + 1980-01-01T00:00:02Z + + diff --git a/java/flight/flight-sql/pom.xml b/java/flight/flight-sql/pom.xml index 1da6ed27601..eee521423fd 100644 --- a/java/flight/flight-sql/pom.xml +++ b/java/flight/flight-sql/pom.xml @@ -24,6 +24,7 @@ jar + 1980-01-01T00:00:02Z 1 diff --git a/java/format/pom.xml b/java/format/pom.xml index a98edefbeb2..af836f3bad6 100644 --- a/java/format/pom.xml +++ b/java/format/pom.xml @@ -23,6 +23,10 @@ Arrow Format Generated Java files from the IPC Flatbuffer definitions. + + 1980-01-01T00:00:02Z + + com.google.flatbuffers diff --git a/java/gandiva/pom.xml b/java/gandiva/pom.xml index 0d2a23345f6..a1ccceea7d8 100644 --- a/java/gandiva/pom.xml +++ b/java/gandiva/pom.xml @@ -23,6 +23,7 @@ Arrow Gandiva Java wrappers around the native Gandiva SQL expression compiler. + 1980-01-01T00:00:02Z 1.8 1.8 3.25.1 diff --git a/java/maven/module-info-compiler-maven-plugin/pom.xml b/java/maven/module-info-compiler-maven-plugin/pom.xml index 6881018933d..acf800b2f8b 100644 --- a/java/maven/module-info-compiler-maven-plugin/pom.xml +++ b/java/maven/module-info-compiler-maven-plugin/pom.xml @@ -30,6 +30,7 @@ + 1980-01-01T00:00:02Z 3.8.7 diff --git a/java/memory/memory-core/pom.xml b/java/memory/memory-core/pom.xml index 2a92d032942..12253b62478 100644 --- a/java/memory/memory-core/pom.xml +++ b/java/memory/memory-core/pom.xml @@ -22,6 +22,10 @@ Arrow Memory - Core Core off-heap memory management libraries for Arrow ValueVectors. + + 1980-01-01T00:00:02Z + + com.google.code.findbugs diff --git a/java/memory/memory-netty/pom.xml b/java/memory/memory-netty/pom.xml index 9b20e1bde2a..02b668472be 100644 --- a/java/memory/memory-netty/pom.xml +++ b/java/memory/memory-netty/pom.xml @@ -21,6 +21,10 @@ Arrow Memory - Netty Netty allocator and utils for allocating memory in Arrow + + 1980-01-01T00:00:02Z + + org.apache.arrow diff --git a/java/memory/memory-unsafe/pom.xml b/java/memory/memory-unsafe/pom.xml index 07a140e5945..76a1d4d21d3 100644 --- a/java/memory/memory-unsafe/pom.xml +++ b/java/memory/memory-unsafe/pom.xml @@ -21,6 +21,9 @@ Arrow Memory - Unsafe Allocator and utils for allocating memory in Arrow based on sun.misc.Unsafe + + 1980-01-01T00:00:02Z + diff --git a/java/performance/pom.xml b/java/performance/pom.xml index 3f69be32a20..166df106f72 100644 --- a/java/performance/pom.xml +++ b/java/performance/pom.xml @@ -80,6 +80,7 @@ + 1980-01-01T00:00:02Z UTF-8 1.37 1.8 diff --git a/java/pom.xml b/java/pom.xml index b05b2d8f142..e9a485c14b6 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -15,7 +15,7 @@ org.apache apache - 18 + 31 org.apache.arrow @@ -28,6 +28,7 @@ https://arrow.apache.org/ + 3.5.0 ${project.build.directory}/generated-sources 1.9.0 5.10.2 @@ -446,6 +447,13 @@ maven-enforcer-plugin 3.4.1 + + + + [3.3.0,4) + + + org.apache.maven.plugins diff --git a/java/tools/pom.xml b/java/tools/pom.xml index 0688fae1ab7..c2f64b4334f 100644 --- a/java/tools/pom.xml +++ b/java/tools/pom.xml @@ -20,6 +20,10 @@ Arrow Tools Java applications for working with Arrow ValueVectors. + + 1980-01-01T00:00:02Z + + org.apache.arrow @@ -85,7 +89,7 @@ maven-assembly-plugin - 3.0.0 + 3.2.0 jar-with-dependencies diff --git a/java/vector/pom.xml b/java/vector/pom.xml index 5cd6d0a00fc..5f897b98f39 100644 --- a/java/vector/pom.xml +++ b/java/vector/pom.xml @@ -20,8 +20,11 @@ Arrow Vectors An off-heap reference implementation for Arrow columnar data format. - + + 1980-01-01T00:00:02Z + + org.apache.arrow arrow-format