ump45nose commented on code in PR #1383:
URL: https://github.com/apache/arrow-java/pull/1383#discussion_r4506356679


##########
dev/release/source-release.xml:
##########
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!--
+  Assembly descriptor for the arrow-java-root-*-source-release.zip artifact
+  built by the apache-release profile.
+
+  This is the same as the "source-release" descriptor shipped in
+  org.apache.apache.resources:apache-source-release-assembly-descriptor:1.8
+  (used by the Apache parent POM), except that it also excludes jni/.
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 
https://maven.apache.org/xsd/assembly-2.2.0.xsd";>
+  <id>source-release</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <!-- main project directory structure -->
+    <fileSet>
+      <directory>.</directory>
+      <outputDirectory></outputDirectory>
+      <useDefaultExcludes>true</useDefaultExcludes>
+      <excludes>
+        <!-- Pre-built JNI libraries that release CI puts in jni/ before
+             building the release artifacts. They are binaries, not source,
+             and are several hundred MB. See GH-743. -->
+        <exclude>jni/**</exclude>

Review Comment:
   Addressed in f5ed5ef by skipping the root source-release assembly (option 2) 
instead of extending an exclude list. With the zip no longer built, the 
`jni-*.tar.gz` files that `rc.yml` leaves at the repo root are not packaged. 
Understood that this can wait until after 20.0.0. (AI-assisted reply.)
   



##########
dev/release/source-release.xml:
##########
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!--
+  Assembly descriptor for the arrow-java-root-*-source-release.zip artifact
+  built by the apache-release profile.
+
+  This is the same as the "source-release" descriptor shipped in
+  org.apache.apache.resources:apache-source-release-assembly-descriptor:1.8
+  (used by the Apache parent POM), except that it also excludes jni/.
+-->
+<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 
https://maven.apache.org/xsd/assembly-2.2.0.xsd";>
+  <id>source-release</id>
+  <formats>
+    <format>zip</format>
+  </formats>
+  <fileSets>
+    <!-- main project directory structure -->
+    <fileSet>
+      <directory>.</directory>
+      <outputDirectory></outputDirectory>
+      <useDefaultExcludes>true</useDefaultExcludes>
+      <excludes>

Review Comment:
   Same fix as the sibling thread (f5ed5ef): with `skipAssembly` there is no 
zip, so the nested `apache-arrow-java-*.tar.gz`, the `artifacts/` checksums and 
the empty `artifacts/jni-*/` and `binaries/` directories are no longer packaged 
either, and there is no exclude list to keep in step with the CI job. 
(AI-assisted reply.)
   



##########
pom.xml:
##########
@@ -786,6 +786,32 @@ under the License.
   </reporting>
 
   <profiles>
+    <profile>
+      <id>apache-release</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-assembly-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>source-release-assembly</id>
+                <configuration>
+                  <!-- Use our own descriptor instead of the Apache parent's
+                       "source-release" one so that pre-built JNI libraries
+                       in jni/ aren't included in the source release. -->
+                  <descriptorRefs combine.self="override"/>

Review Comment:
   Went with option 2 in f5ed5ef: the root `source-release-assembly` execution 
in the `apache-release` profile now sets `<skipAssembly>true</skipAssembly>`, 
the same way `bom/pom.xml` does, and `dev/release/source-release.xml` is 
removed. Locally, `mvn -N -Papache-release package -DskipTests` runs the 
execution without writing a zip to `target/`, and `spotless:check` passes. 
(AI-assisted reply.)
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to