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

robertlazarski pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-core.git

commit 4be16e2285961e3b6f4a9ca30d507fc864a1cf9e
Author: Robert Lazarski <[email protected]>
AuthorDate: Sun Sep 6 07:53:33 2026 -1000

    Fail the version sync when it matches nothing
    
    replaceregexp reports nothing when it matches nothing, so a renamed or 
dropped
    axis2.version property would leave a userguide sample pinned to a stale 
version
    and the release would carry on quietly -- the failure mode the sync exists 
to
    prevent. Count the poms, count the ones carrying the version being 
released, and
    fail on a mismatch naming the counts.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
---
 pom.xml | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/pom.xml b/pom.xml
index 7984696492..21c1798c64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1378,6 +1378,28 @@
                                     <fileset 
dir="${basedir}/modules/samples/userguide/src/userguide"
                                              includes="*/pom.xml"/>
                                 </replaceregexp>
+                                <!-- replaceregexp reports nothing when it 
matches nothing, so a
+                                     renamed or dropped property would leave a 
sample pinned to a
+                                     stale version and the release would carry 
on quietly. Count
+                                     the poms, count the ones now carrying 
this version, and fail
+                                     if they differ. -->
+                                <resourcecount property="userguide.pom.count">
+                                    <fileset 
dir="${basedir}/modules/samples/userguide/src/userguide"
+                                             includes="*/pom.xml"/>
+                                </resourcecount>
+                                <resourcecount 
property="userguide.synced.count">
+                                    <fileset 
dir="${basedir}/modules/samples/userguide/src/userguide"
+                                             includes="*/pom.xml">
+                                        <contains 
text="&lt;axis2.version&gt;${project.version}&lt;/axis2.version&gt;"/>
+                                    </fileset>
+                                </resourcecount>
+                                <fail message="axis2.version sync reached only 
${userguide.synced.count} of ${userguide.pom.count} userguide sample poms - 
check the property name in each">
+                                    <condition>
+                                        <not>
+                                            <equals 
arg1="${userguide.pom.count}" arg2="${userguide.synced.count}"/>
+                                        </not>
+                                    </condition>
+                                </fail>
                             </target>
                         </configuration>
                     </execution>

Reply via email to