This is an automated email from the ASF dual-hosted git repository.

sergehuber pushed a commit to branch UNOMI-1011-no-buildcache-deploy
in repository https://gitbox.apache.org/repos/asf/unomi.git

commit 09ce6639aa7797c4a7645c8af35663def34e56ac
Author: Serge Huber <[email protected]>
AuthorDate: Wed Nov 11 17:32:59 2026 +0100

    UNOMI-1011: Stop publishing the empty buildcache jar
    
    Write the local dummy jar with antrun instead of the jar plugin so it is
    never attached. Extend release-audit.sh to assert deploy stages the
    distribution and not a buildcache artifact.
---
 package/pom.xml  | 42 +++++++++++++++++++-----------------------
 release-audit.sh | 21 ++++++++++++++++++++-
 2 files changed, 39 insertions(+), 24 deletions(-)

diff --git a/package/pom.xml b/package/pom.xml
index eb3debe16..bf3b87607 100644
--- a/package/pom.xml
+++ b/package/pom.xml
@@ -411,30 +411,26 @@
                 </configuration>
             </plugin>
 
-        <!-- Create a dummy JAR just for caching, this is a workaround to 
avoid Maven Build cache issues -->
+        <!-- Local-only dummy JAR for build tooling (historically Maven Build 
Cache). Written to
+             target/ but never attached, so install/deploy do not publish 
unomi-*-buildcache.jar
+             (UNOMI-1011). The jar plugin always attaches classified jars in 
3.2.x. -->
             <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-jar-plugin</artifactId>
-            <executions>
-                <execution>
-                <id>create-dummy-jar</id>
-                <phase>package</phase>
-                <goals>
-                    <goal>jar</goal>
-                </goals>
-                <configuration>
-                    <!-- A classifier keeps this jar a side artifact. Without 
one, the jar plugin makes it
-                         the artifact of this pom-packaged module, which is 
what the blanket deploy skip
-                         below was added to hide, and that skip took the 
distribution with it. -->
-                    <classifier>buildcache</classifier>
-                    <archive>
-                    <manifest>
-                        
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
-                    </manifest>
-                    </archive>
-                </configuration>
-                </execution>
-            </executions>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>create-dummy-jar</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <target>
+                                <jar 
destfile="${project.build.directory}/${project.build.finalName}-buildcache.jar"/>
+                            </target>
+                        </configuration>
+                    </execution>
+                </executions>
             </plugin>
 
         </plugins>
diff --git a/release-audit.sh b/release-audit.sh
index 2a0dd0919..8ad4e9878 100755
--- a/release-audit.sh
+++ b/release-audit.sh
@@ -17,4 +17,23 @@
 #    limitations under the License.
 #
 
################################################################################
-mvn clean install -P integration-tests,rat
\ No newline at end of file
+set -euo pipefail
+
+mvn clean install -P integration-tests,rat
+
+# UNOMI-1011: the package module must publish the distribution archives and 
must not
+# publish the empty buildcache jar used only as a Maven Build Cache workaround.
+STAGE=$(mktemp -d)
+trap 'rm -rf "$STAGE"' EXIT
+mvn -pl package deploy -DskipTests 
-DaltDeploymentRepository="local::default::file://${STAGE}"
+if find "$STAGE" -name '*buildcache*' | grep -q .; then
+  echo "error: staged artifacts must not include a buildcache jar 
(UNOMI-1011)" >&2
+  find "$STAGE" -name '*buildcache*' >&2
+  exit 1
+fi
+if ! find "$STAGE" \( -name 'unomi-*.zip' -o -name 'unomi-*.tar.gz' \) | grep 
-q .; then
+  echo "error: staged artifacts must include the binary distribution archives" 
>&2
+  find "$STAGE" -type f >&2
+  exit 1
+fi
+echo "UNOMI-1011 check ok: distribution present, no buildcache artifact in 
${STAGE}"

Reply via email to