You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ro...@apache.org on 2026/09/06 17:47:10 UTC
(axis-axis2-java-core) branch master updated: Keep sample poms on the released version automatically
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
The following commit(s) were added to refs/heads/master by this push:
new 6a64874585 Keep sample poms on the released version automatically
6a64874585 is described below
commit 6a648745852b39b17b0e410e3682ec422df20c9b
Author: Robert Lazarski <ro...@gmail.com>
AuthorDate: Sun Sep 6 07:42:14 2026 -1000
Keep sample poms on the released version automatically
swagger-server sat at parent 2.0.1-SNAPSHOT for the whole 2.0.1 cycle and
shipped that way, because release:prepare only rewrites reactor modules. It is a
reactor module now, which also subjected it to tidy:pom for the first time. The
three Spring Boot userguide samples cannot join the reactor -- they inherit
spring-boot-starter-parent -- so an antrun execution rewrites their single
axis2.version property, invoked by id from the release plugin's preparation and
completion goals. It is bound to no phase, so ordinary builds leave the checked-in
poms alone.
Co-Authored-By: Claude Opus 5 (1M context) <no...@anthropic.com>
---
modules/samples/swagger-server/pom.xml | 10 ++++-----
pom.xml | 39 ++++++++++++++++++++++++++++++++++
src/site/markdown/release-process.md | 22 +++++++++++++++++--
3 files changed, 63 insertions(+), 8 deletions(-)
diff --git a/modules/samples/swagger-server/pom.xml b/modules/samples/swagger-server/pom.xml
index 0c39e9f1ff..8f92f9f3cc 100644
--- a/modules/samples/swagger-server/pom.xml
+++ b/modules/samples/swagger-server/pom.xml
@@ -18,22 +18,20 @@
~ under the License.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
- http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
- <version>2.0.1-SNAPSHOT</version>
+ <version>2.0.2-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<artifactId>axis2-swagger-server</artifactId>
- <name>Apache Axis2 - Swagger REST Server Sample</name>
<packaging>war</packaging>
+
+ <name>Apache Axis2 - Swagger REST Server Sample</name>
<description>
Financial data services server using Axis2 REST services with OpenAPI/Swagger documentation.
Demonstrates Axis2 REST capabilities with comprehensive OpenAPI integration.
diff --git a/pom.xml b/pom.xml
index 8b3533fabc..7984696492 100644
--- a/pom.xml
+++ b/pom.xml
@@ -393,6 +393,7 @@
<module>modules/mtompolicy</module>
<module>modules/mtompolicy-mar</module>
<module>modules/ping</module>
+ <module>modules/samples/swagger-server</module>
<module>modules/samples/version</module>
<!-- SOAPMonitor removed: AXIS2-6105 (Java Applets removed from JDK in Java 11) -->
<module>modules/schema-validation</module>
@@ -1000,6 +1001,14 @@
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
<tagNameFormat>v@{project.version}</tagNameFormat>
+ <!-- The Spring Boot userguide samples cannot join the reactor: they
+ inherit spring-boot-starter-parent, so release:prepare never sees
+ them and their <axis2.version> would keep pointing at a SNAPSHOT
+ that does not exist once the release is out. Running the sync
+ here means the rewrite lands in the release commit and the tag,
+ next to the versions release:prepare rewrites itself. -->
+ <preparationGoals>clean verify antrun:run@sync-userguide-sample-versions</preparationGoals>
+ <completionGoals>antrun:run@sync-userguide-sample-versions</completionGoals>
</configuration>
</plugin>
<plugin>
@@ -1344,6 +1353,36 @@
<attach>true</attach>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <!-- Deliberately bound to no phase: an ordinary build must not
+ rewrite checked-in sample poms. maven-release-plugin invokes
+ it by id (see preparationGoals above); it can also be run by
+ hand as
+ mvn antrun:run@sync-userguide-sample-versions
+ which is what the release guide tells the RM to do when
+ cutting by hand rather than with release:prepare. -->
+ <id>sync-userguide-sample-versions</id>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <echo message="Setting axis2.version to ${project.version} in the userguide Spring Boot samples"/>
+ <replaceregexp
+ match="<axis2\.version>[^<]*</axis2\.version>"
+ replace="<axis2.version>${project.version}</axis2.version>"
+ byline="true">
+ <fileset dir="${basedir}/modules/samples/userguide/src/userguide"
+ includes="*/pom.xml"/>
+ </replaceregexp>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
diff --git a/src/site/markdown/release-process.md b/src/site/markdown/release-process.md
index 96fd7da8fa..685fbb6795 100644
--- a/src/site/markdown/release-process.md
+++ b/src/site/markdown/release-process.md
@@ -122,9 +122,27 @@ You may also execute a dry run of the release process: mvn release:prepare -Ddry
`src/site/markdown/release-notes/` (e.g., `2.0.2.md`). The distribution assembly
references this file and the build will fail without it.
-5. Check that the source distribution is buildable.
+5. The Spring Boot userguide samples under
+ `modules/samples/userguide/src/userguide/` inherit `spring-boot-starter-parent`,
+ so they cannot be reactor modules and `release:prepare` does not rewrite their
+ versions. Each declares a single `<axis2.version>` property, and the release
+ plugin's `preparationGoals`/`completionGoals` invoke
-6. Check that the source tree is buildable with an empty local Maven repository.
+ mvn antrun:run@sync-userguide-sample-versions
+
+ which rewrites that property to the version being built. Nothing to do when
+ releasing with `release:prepare` -- but check the release commit contains the
+ rewrite, and run the goal by hand if you are cutting a release any other way.
+ Left unsynced, the shipped samples point at a SNAPSHOT that does not exist.
+
+ The same class of problem bites any sample kept out of the reactor:
+ `swagger-server` sat at `2.0.1-SNAPSHOT` through the whole 2.0.1 cycle because
+ of it. It is a reactor module now, which is the preferred fix where the sample's
+ parent allows it.
+
+6. Check that the source distribution is buildable.
+
+7. Check that the source tree is buildable with an empty local Maven repository.
If any problems are detected, they should be fixed on the trunk (except for issues specific to the
release branch) and then merged to the release branch.